Move mouse to a word when pressing a shortcut key

Hello,

As the title says I'm trying to move my mouse to a word when pressing a shortcut key (the word appears on a custom app). Struggling to figure this app out and do it? Can anyone point me in the right direction? Cheers

Screenshots and broader context would help determine the best method.

Screenshot 2024-01-03 at 09.14.22

Sure, so here is the text on the app that I wish the mouse to move to. It's highlightable as you can see in the screenshot (not sure if that makes a difference).

This button will appear in the app that I have opened on my screen. I currently have a macro that takes me close to it when I press a shortcut, BUT above this button is text, and depending on how much text comes through the position of the button moves.

I was thinking a solution would be OCR scanning my screen when I press a shortcut and then moving my mouse once it found the button.

Thanks!

So it doesn't always show as "20K"?

It's very hard to find the best solution without knowing more about the app or what you're trying to do.

@Airy might be able to help with that route.

Custom app so I can't show anything more, unfortunately. It will show 20K at certain times (when the app loads data) hence why I want to trigger the automation via a shortcut.

What I'm asking is whether it will always display "20K" when you want to click it. If so you can simply click at a found image of the button in that state.

Yes it will always display 20K

This should do the job then:

1 Like

Edited* Thank you noisneil! Just managed to copy that and it works flawlessly

One more question. How do I keep this running? I hit Run here and then I close out of it and it appears on my bar at the top but hotkey doesnt work anymore which is odd

Screenshot 2024-01-03 at 15.28.23

Edit again* I think the problem is that it works the first time, but when a new item appears within the app with a NEW 20K button it doesn't rescan that area and recognise it?

Instead of using the Run button, trigger the macro with the hotkey while your amp is front-most and the image is visible. Ensure that the area you have limited the search to does in fact allow for all possible locations at which the image may appear.

Suggestion for @peternlewis: it would be handy in situations such as these to have a built-in highlight rectangle option for all KM actions that use areas. Been meaning to say that for a while; perhaps it's been requested before?

1 Like