has anyone figured out a way to script the keystroke for the globe key?
tell application "System Events" to keystroke "m" using command down
works, but
tell application "System Events" to keystroke "f" using globe down
does not.
has anyone figured out a way to script the keystroke for the globe key?
tell application "System Events" to keystroke "m" using command down
works, but
tell application "System Events" to keystroke "f" using globe down
does not.
No, I couldn’t find anything on how to script the globe or FN keys in AppleScript.
Looks like you want to change to full screen mode with globe + f, you can also do it this way:
tell application "System Events" to tell process "YOUR APP"
set value of attribute "AXFullScreen" of window 1 to true
end tell
or
tell application "System Events" to set value of attribute "AXFullScreen" of front window of (first process whose frontmost is true) to true
yeah, I started there, but had other issues when I was trying to activate two things I would get an error that the app (AppleScript app) was not allowed to send keystrokes It worked for one action, but not for two. I thought maybe globe would behave differently.
You can script the Function keys though, you just need the Key Codes.