Is it possible to invoke a keyboard shortcut from applescript?
For example I like to run the F11 keyboard shortcut.
The following works from the terminal.
osascript -e "tell applications \"System Events\"" -e "key code 100" -e "end tell"
Alternatively I believe this should work.
tell application "System Events" key code 101 end tell
Googling mac osx system events key code should bring up several options.