So i have been playing with apple script since i got two imacs… I basically have been trying to get one to use command f2 30 seconds after boot to goto target display (so i dont need 2 keyboards) and i cant get it to work…
anyone have any ideas?
heres my cod.
tell me to delay 30
tell application "System Events" to keystroke "F2" using {command down}
this way won’t work at all. The AppleScript runner environment has not been loaded yet at boot time.
and even if it was available, sending key codes with System Events affects only applications with a GUI