GUI scripting with multiple monitors when main display is Full Screen

Joined
Jan 31, 2017
Messages
1
Reaction score
0
Points
1
Discovered that (El Capitan):

With multiple monitors, when the main display has an application open Full Screen, it can affect how Applescript GUI scripting occurs on a secondary display.

Try this script when Safari is on a secondary display and something else is Full Screen on the main display.
How can the the script be made to work?
I tried set frontmost to true and then also AXRaise but it didn't help. Would really like to not cycle the Full Screen app to complete the GUI script actions.

Code:
tell application "Safari" to activate
tell application "System Events"
	click menu item "Reload Page" of ((process "Safari")'s (menu bar 1)'s (menu bar item "View")'s (menu "View"))
end tell
 
Last edited:

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top