Hello guys,
When I want to map hotkeys to a button in application that where the application:
+ does not have existing hotkeys
+ does not allow to build custom hotkeys to a button
I have used image recognition and location-based mouse-click as a workaround where both are prone to break.
Does anyone know a better method?
for example... Excel:
Targeting buttons
Re: Targeting buttons
how do they break? for example, in your image, you would want to make sure that you are searching for an image of the paint can, but WITHOUT the yellow color underneath. you wouldn't want to search for any color underneath. probably only the white paint can itself
Re: Targeting buttons
Use relative coordinate system, or use the built-in macro function.
Code: Select all
CoordMode Pixel, Window
SetTitleMatchMode 2
WinTitle:="part of Title text"
if WinExist(WinTitle) {
WinActivate
ImageSearch ...
if found {
key sequence
} else {
more ...
}
}
Re: Targeting buttons
You can probably improve on your image recognition to get more predicable results. Make the search image smaller, add a viariation option sp that is is found more easily.
Re: Targeting buttons
Thank you for the response!guest3456 wrote: ↑13 Jan 2020, 03:45how do they break? for example, in your image, you would want to make sure that you are searching for an image of the paint can, but WITHOUT the yellow color underneath. you wouldn't want to search for any color underneath. probably only the white paint can itself
Best example would be application update, where the buttons change. Another, will be that what I've created wont work for another person due to resolution differences. Both are for Image Search.
Besides on how to improve on existing methods such as Image Search, I was curious if anyone had a different approach to it, while it may be limited to certain applications. More under-the-hood type.
Thanks!