Trouble with ImageSearch

Ask gaming related questions (AHK v1.1 and older)
Ghoti
Posts: 24
Joined: 01 Dec 2022, 07:41

Trouble with ImageSearch

Post by Ghoti » 01 Dec 2022, 08:01

Hi guys. I'm having trouble getting ImageSearch to work with Bluestacks. I've bene using AutoHotKey for more than a decade, and have successfully used ImageSearch with games in the past. For some reason I've never been able to get it to work within the game that I play inside Bluestacks. It doesn't matter how small of a range I give it to look in, or how high I set the color variance, it will never find a match. An example of the code I use is below, as well as example images. I'm certain that my coordinates are correct. I've also tried it with much bigger target images than this example with the same results. Any ideas?

Code: Select all

ImageSearch, varX, varY, 195, 385, 226, 405, *12 fire9.jpg
if (ErrorLevel = 2)
	MsgBox Could not conduct the search.
else if (ErrorLevel = 1)
	MsgBox Image could not be found on the screen.
else
	MsgBox The image was found at %varX%x%varY%.
This is a screenshot of the Bluestacks window. I'm searching for the number 8, after the word "Suppression", under the fire icon.
Image

This is the image i'm using to search with:
Image

Any help you can offer would be appreciated. Thanks!
-Ghoti


[Mod action: Topic moved to "Gaming"]

User avatar
boiler
Posts: 16902
Joined: 21 Dec 2014, 02:44

Re: Trouble with ImageSearch

Post by boiler » 01 Dec 2022, 08:18

If you zoom in on each, you can see that they are not really even that close of a pixel-for-pixel match, which is typical for text. It often gets rendered differently in different locations, which is the case here.

Also, you are including way too much background around what you are trying to find.

Post Reply

Return to “Gaming Help (v1)”