I'm using AHK image search to find part of a on a web page and clicking it - the search box.
It works!
The problem is on a next page it doesn't. It's the same search box.
I think it's bad designing on website. I'm guessing there is a color difference maybe.
IMPORTANT: I don't want to use Selinum or COM. This is an intentional choice.
Is there someway of doing the image search and choosing something that 'roughly' matches the searched image?
Thanks.
Image search not working
Re: Image search not working
If you have to guess if there is a difference, the design seems to be ok. I don't think that the creator of any website especially cares about if Imagesearch works on it (if they want to allow and/or encourage automation, there are much better ways to do that). But even if... then they probably would want to make sure that automation doesn't work easily
In terms of color variations, yes. Use *n in the ImageFile parameter of Imagesearch:
The *TransN option might also help in some cases.https://www.autohotkey.com/docs/commands/ImageSearch.htm wrote:*n (variation):
Specify for n a number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of each pixel's color. For example, *2 would allow two shades of variation. This parameter is helpful if the coloring of the image varies slightly or if ImageFile uses a format such as GIF or JPG that does not accurately represent an image on the screen. If you specify 255 shades of variation, all colors will match. The default is 0 shades.
Re: Image search not working
If it turns out you're not able to have one ImageSearch command find both of them, you can create a little function for looking for the search box which would perform two ImageSearch commands with their own reference images and return a result based on finding either of them.
Re: Image search not working
Thanks for the replies guys.
I think the best option might be to have multiple images, more than 2.
I think the best option might be to have multiple images, more than 2.
Who is online
Users browsing this forum: AlFlo and 218 guests