i am just thinking about a workflow in protools. i would like to automatically enter a context menu and move my mouse cursor to a specific menu item in a submenu.
manually i would right click on a specific audio clip to access the context menu. from there i would move the cursor to its 10th menu item to access a submenu and then choose a specific audio channel from the list. here is how it looks like:
so far i have the following. this just moves the selection but not mouse cursor to the right spot in the menu.
any ideas how to move the mouse cursor to that spot? thanks!
thanks, what exactly do you mean with status menu?
it i not possible to access this function via a programm menubar on th top of th screen… if that is what you had in mind.
i used uibrowser to get the name of this context menu. but the menu name was unknown?.?.
it looked something like this:
menu: "" (-8273929877389750)
If you want to select that item, there is no need to move the mouse cursor to there. Once it is highlighted as you have it, you just need to hit the return key. So, you could add one more step to your macro: Simulate Keystroke "Return".
right, i forgot to mention that i want to spot the mouse cursor at a default postion in the submenu. so i can quickly choose from this list of channels/audiofiles by using the mouse (the list of audiochannels will change depending on which sndfile i right click). moving down this list via arrow down, up and select a channel by return, means that i need to switch from mouse to keyboard with my right hand … thats the reason why i want to move the cursor to the submenu so i can stick with the mouse.
As you can see "position" is a property of the element you have selected.
So, in theory, you could run an AppleScript after the context menu appears, get the element, and it's position. Then use that position to move the mouse with a KM "Move Mouse" action.
I have used this technique with other popup elements, but not this one. So, it is just an untested theory.
thanks for all the feedback. that helps a lot. @JMichaelTX if i understand you, you recomment to navigate to the submenu (via my km macro) than ask with an applescript for the coordinates of that item, that i store in a variable and use it to set the new cursor position (via km again). right?
@appleianer nice. will look into that if i cant figure it out with applescript. thanks!
@MartinPacker what do you mean by that? by typing the items name directly?
Sometimes, once in a menu you can navigate it with keystrokes. It's worth exploring if you can do it in this case, rather than using a rather unreliable mousing around method.