• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Safari and "universal" window switcher
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: iTunes playpause vs. mute
  • Next by Date: Re: How can you tell whether you have a reference or not?
  • Previous by thread: Re: iTunes playpause vs. mute
  • Next by thread: dealing with tex-edit plus F
  • Index(es):
    • Date
    • Thread