Safari and "universal" window switcher
Safari and "universal" window switcher
- Subject: Safari and "universal" window switcher
- From: Michael Grant <email@hidden>
- Date: Fri, 07 Feb 2003 13:07:09 -0600
I use Keyboard Maestro to assign a keyboard shortcut to the simple script
below. It works reasonably well in most apps, and I have separate
workarounds for the handful of apps I commonly use where it doesn't--except
for Safari.
A little background: I'm aware of the command-` shortcut to switch windows,
but I don't normally use a US keyboard, and this command doesn't work in
Safari in the keyboard I do use (nor do any of the variants I know of).
What happens in Safari when I try to use the script is that the hindmost
window is brought to the front, but remains inactive. The stoplight buttons
remain grayed out, and command-w closes not the window I'm looking at but
the previous front window.
A glance at Safari's dictionary doesn't reveal any obvious way to make a
window active rather than merely bringing it to the front. Any ideas?
Here's the script:
set app1 to (path to frontmost application as string)
tell application app1
set theWindows to (windows whose visible is true)
set index of window (count of theWindows) to 1
end tell
Thanks,
Michael
--
A most ingenious paradox!
We've quips and quibbles heard in flocks,
But none to beat this paradox!
A paradox, a paradox,
A most ingenious paradox!
Gilbert and Sullivan, The Pirates of Penzance, 1880.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.