Tricky Image Search with Partial Image Names?

Get help with using AutoHotkey and its commands and hotkeys
GT77
Posts: 12
Joined: 06 Aug 2017, 23:48

Tricky Image Search with Partial Image Names?

07 Aug 2017, 00:22

Is it possible to do Image Search with partial image names?

For example, there are buttons on a website. Location of buttons move constantly and It also changes color in about 100 different shades so setting range of color to find a button would not work.

However, file names of a button image is somewhat similar. It goes like Button1.png, Button2.png, Button3.png and so on.

So I want to know if there is a way to do Image Search with partial image names like 'Find Button(1-100).png' something like that with AHK or with any other computer languages.

I think it would be very hard because it may require reading and processing html info but I just want to give it a shot if there is someone who can write advance code.
Last edited by GT77 on 08 Aug 2017, 08:44, edited 1 time in total.
User avatar
Blackholyman
Posts: 1292
Joined: 29 Sep 2013, 22:57
Facebook: socialjsz
Google: +Jszapp
Location: Denmark
Contact:

Re: Tricky Image Search with Partial Image Names?

07 Aug 2017, 03:54

unsure what you really need.

do you have alot of images of the button with all the colors?

or do you wish to search the page for the text name of the button?

or something else i'm not getting?

Please try and re-wording what your trying to get help with!
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
GT77
Posts: 12
Joined: 06 Aug 2017, 23:48

Re: Tricky Image Search with Partial Image Names?

07 Aug 2017, 08:34

Thank you for having interest in my question, Blackholyman!

It changes color by reloading different image file (ex.Button1.png, Button2.png..and so on) There are 100 different button images, hence 100 different colors. All with same shape and size, just different color.

There is no text on the button, just solid color. I wish to search the page for file name of the button image that was loaded on a page.
Last edited by GT77 on 08 Aug 2017, 07:13, edited 2 times in total.
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Tricky Image Search with Partial Image Names?

07 Aug 2017, 10:44

You can name your images something like Image1-Image10, and then do something like this so search for all of them:

Code: Select all

Loop 10
{
ImageSearch, x, y, 1, 1, 1920, 1080, *100 C:\AutoHotkey\Image%A_Index%.png
If (ErrorLevel == 0)
	Break
}
GT77
Posts: 12
Joined: 06 Aug 2017, 23:48

Re: Tricky Image Search with Partial Image Names?

08 Aug 2017, 07:28

neomulemi6 wrote:You can name your images something like Image1-Image10, and then do something like this so search for all of them:

Code: Select all

Loop 10
{
ImageSearch, x, y, 1, 1, 1920, 1080, *100 C:\AutoHotkey\Image%A_Index%.png
If (ErrorLevel == 0)
	Break
}
Thank you very much for your answer, neomulemi6! That is very nice code to scan multiple images using Loop function :dance:

I have another question. Is it possible to scan multiple images(or colors) one pixel at a time?

For example, I wish to scan a pixel for multiple images or colors and move on to next pixel for scanning, as opposed to scan all pixels in given area for one image and move on to next image.

I would like to click a button on top of the page if there are 2 or more buttons present at the same time.

Return to “Ask For Help”

Who is online

Users browsing this forum: 3d1t0r, Bing [Bot], boiler, drewjbx1, evilmanimani, Google [Bot], mikeyww, roysubs, yyardim and 44 guests