How to cycle between menu options with one hotkey?

This could apply to anything but I’m specifically using Pro Tools 11 and would like one hotkey to cycle, in order, through 5 options in a menu called “Main Counter”. Creating independent hotkeys for each one is easy but feels wasteful.

[The menu][1]
[1]: http://i.imgur.com/J2B5EQO.jpg

Any help would be greatly appreciated!

You can do sequences in Keyboard Maestro in a couple ways. The easiest is just have a variable that tracks the next state and a switch statement.

This example cycles through window positions, but cycling through menus would work the same way, just use Select Menu Item actions instead of Move Window actions.

1 Like

Aw dang. Don’t have version 7 as I am still on OS X 10.9.5 for various reasons. That sounds perfect though…

In version 6 you can do the same thing with nested If Then Else actions. Its more cumbersome, but not difficult.

  • If Variable “Next State” is Left Then
    • Left stuff, Set variable “Next State” to Middle
  • Else
    • If Variable “Next State” is Middle Then
      • Middle stuff, Set variable “Next State” to Right
    • Else
      • Middle stuff, Set variable “Next State” to Left
1 Like

Thanks so much! This actually worked, but since two menu items with the same name existed, the macro got stuck. So I went into OS X preferences, made large cumbersome shortcuts for each menu item (which you can do in keyboard preferences using “->” to differentiate the menu choice like “View->Main Counter->Bars:Beats”.

Back in KM, my “if” statement was “If a menu item with shortcut X is marked, execute the following actions”. This pinpointed the specific like-named menu item and allowed the macro to succeed.

This also works in Keyboard Maestro 7 - not that that helps you in version 6.

1 Like