Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

applescript - Exit Full Screen menu bar item

Is it possible to click the Exit Full Screen menu bar item?


I cannot get a reference from Accessibility Inspector nor UI Browser.

MacBook Air, OS X Mountain Lion (10.8.4)

Posted on Aug 2, 2013 5:24 PM

Reply
Question marked as Best reply

Posted on Aug 5, 2013 4:32 PM

Maybe you could use the Escape key, like this for example:


tell application "Safari" to activate

tell application "System Events" to key code 53

3 replies

Aug 6, 2013 5:09 AM in response to Pierre L.

That's not exactly what I'm asking for but thanks anyway. That works too.


Eventually I used the AXFullScreen attribute and this script.


tellapplication "System Events" totell (firstprocesswhosefrontmostistrue)

delay 0.05

if front window exists then

tell front window

if value of attribute "AXFullScreen" then

set value of attribute "AXFullScreen" to false

else

set value of attribute "AXFullScreen" to true

end if

end tell

end if

end tell

applescript - Exit Full Screen menu bar item

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.