Click at found image doesn't work in popup submenus? (select channel-names in protools)


in protools i want to address text items in a sub menue of popupwindow.
(when i rightclick on a clip, a popup expands and it contains items that opens/expands submenus. in one of that submenus i successfully navigate to but failed to click on item by name)
when i use the click on found image function (with a small screenshot of the name of the item) i always get an error saying "macro canceled".
doing the same on in the front layer of the popup (not in the submenu) it works.
is there something that i could try to make it work?

KM 8.2.4
osx 10.13.6
running protools ultimate 2021.7

thanks, johannes

So, to be clear you can invoke the first layer of the pop up menu using found image?

Can you then use the Keyboard arrow keys or typing first letters of items to navigate further into the menu?

If so then you can make a macro to invoke the menu (using the found image as you are doing) and then have the Macro simulate typing keystrokes to select the item. I do this a lot and it works very well.

A good idea is to put a pause in the Macro (maybe one second) before the Macro fires the item (by simulating a Return key) - that way you know it has the correct item.

1 Like

thanks for your fast reply,

yes i can click via found image on the first layer.
yes i can navigate further via arrows or by tying the first letter or even the whole name of the item.
i already wrote a script that gets me somewhere in the submenu…close to where i want.

the problem is, that the item number and names of this very submenu is dynamic.
that means that depending on wich clip iam right clicking on, the list of items is different.
(each of these clips are referring to channels of audiofiles on my drive.)

what stays constant for all clips in a project is a part of the itemname that is always written in brackets -the so called channel name. for example (Boom_1) while the complete name of the item that i want invoke might be
46-1_whatever57826837989.A22 (Boom_1)

will try longer pauses too…

Okay - I have just tested this approach in the Notes App (I don't have Protools) and it will work as long as I put a 0.25 second pause just before the final click at found image. I think it needs this for the System to catch up with Keyboard Maestro. You might have to experiment with the length of the pause. And to confirm - it always fails (as you have found) without the pause.

EXAMPLE Select Context Menu Item by Image.kmmacros (19.3 KB)

Click to show Macro Image


great! it works that way with a pause right before the found image!

sometimes the items name is italic. than it won't match.
is there a way to first tryout normal style lettering and if it doesn't work try italic… ?

Yes. Just make two Click at Found Image Actions one after the other (one italic, one normal) and set their gear settings to not notify on failure and not abort the macro. What this does is Keyboard Maestro will use whichever works and ignore the one that doesn't:






ok i set it up that way but it will only execute the first found image action and ignore the other one… not sure why this happens.

is there another way - maybe via conditions?

edit. well, it seems to work but its very unstable.
i tried to change the two screenshots and give it bit more time but its doesnt change anything.

That is a better starting point than never working :grinning:

To be honest, using a Found Image is often the weak spot in any Keyboard Maestro chain of Actions and you have two in your Macro. If it sometimes works I still suspect it is a timing issue.

When I am trying to debug something like this I will put in a crazy long pause between each Action (like 3 seconds) just to test if Keyboard Maestro can find the image on the screen if it has all the time in the world. If the Macro fails at least you have found it is definitely not to do with the timing. And make sure you tick the "show" option in the Find Image Action so you see a green highlight when Keyboard Maestro finds the image.

EDIT - of course while this series of Actions is running (as it uses the mouse and keys) you have to not nudge the mouse even a tiny fraction by resting your hand on the mouse. Sounds obvious but this has tripped me up before with this kind of Macro.

1 Like