Re: strange behavior setting window index to 1 in Safari
Re: strange behavior setting window index to 1 in Safari
- Subject: Re: strange behavior setting window index to 1 in Safari
- From: Christopher Stone <email@hidden>
- Date: Sat, 04 Jun 2016 16:19:18 -0500
On Jun 04, 2016, at 12:56, Mitchell L Model <email@hidden> wrote:
tell application "Safari" set the index of window 2 to 1 end tell
brings the second window to the front but leaves focus in the previously front window. ______________________________________________________________________
This is an infuriating long-term bug in OSX (since Mountain Lion if memory serves).
It affects more apps than just Safari.
------------------------------------------------------------ set windowIndexNum to 2
tell application "System Events" tell application process "Safari" set winList to (windows whose subrole is "AXStandardWindow") tell item windowIndexNum of winList perform action "AXRaise" end tell end tell end tell ------------------------------------------------------------
I'm doing it this way rather than using the window name, because Safari can have duplicate window names.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden