Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to invoke your menu?

edited November 2013 in FastScripts
One of the first thing I tried after installing FastScripts was to create a keyboard shortcut for your own preferences.

I tried things like

tell application "System Events" to tell process "FastScripts"
tell menu bar 1
click menu item "FastScripts" of menu 1 of menu bar item 1
end tell
end tell

but it always complains it cannot find menu bar 1 of FastScripts.

How can this be done?


  • Hi there - I'm not sure if this is possible. I was able to locate the desired menu item but unfortunately "clicking" it doesn't seem to work:

    tell application \"System Events\" to tell process \"FastScripts\"
    set fastScriptsMenu to item 1 of menu \"FastScripts\" of menu bar 1
    click menu item \"Preferences…\" of fastScriptsMenu
    end tell

    I will consider adding a specific "show preferences" scripting command in the future. In the meantime unfortunately I don't have a great solution for you. The closest thing is probably to use the keyboard shortcut to bring up the FastScripts menu, and then arrow in to the preferences.
  • I forgot to say, I am running Mavericks. I get
    Error Number:Unknown error.
    with this script. You don't get that?
  • edited November 2013
    No - the script runs fine, but as I said it doesn't seem to work as desired. The menu is not clicked and nothing happens. (Am also running Mavericks).
  • System Events clicking is... inconsistent, let's be charitable. I've had success using the "cliclick" command-line tool:
  • Thanks for sharing that!
Sign In or Register to comment.