Applescript: How to Activate the File Menu

set front_app_path to path to frontmost application as Unicode text
delay .2 //short delay, get your hands off the keys you used to activate
tell application "System Events"
    //tell the front application
    tell application front_app_path
        //press control+f2 (activate apple menu)
        key code 120 using {control down}
        key code 124 //right
        key code 124 //right
        key code 125 //down
    end tell
end tell

Related Posts:

This entry was posted in Tech Tips and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *