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.
Tricky Image Search with Partial Image Names?
Tricky Image Search with Partial Image Names?
Last edited by GT77 on 08 Aug 2017, 08:44, edited 1 time in total.
- Blackholyman
- Posts: 1293
- Joined: 29 Sep 2013, 22:57
- Location: Denmark
- Contact:
Re: Tricky Image Search with Partial Image Names?
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!
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!
Courses on AutoHotkey
My Autohotkey Blog
![Yay! Dance! Yay! :dance:](./images/smilies/dance.gif)
Re: Tricky Image Search with Partial Image Names?
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.
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.
-
- Posts: 216
- Joined: 30 Jun 2016, 06:01
Re: Tricky Image Search with Partial Image Names?
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
}
Re: Tricky Image Search with Partial Image Names?
Thank you very much for your answer, neomulemi6! That is very nice code to scan multiple images using Loop functionneomulemi6 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 }
![Yay! Dance! Yay! :dance:](./images/smilies/dance.gif)
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.
-
- Posts: 216
- Joined: 30 Jun 2016, 06:01
Re: Tricky Image Search with Partial Image Names?
That's what PixelSearch is for.
Who is online
Users browsing this forum: No registered users and 400 guests