search for images disregarding what is in the center of the image

Ask gaming related questions (AHK v1.1 and older)
sakamoto
Posts: 7
Joined: 03 Oct 2022, 19:57

search for images disregarding what is in the center of the image

Post by sakamoto » 28 Nov 2023, 21:23

MPQ_Nodes.gif
MPQ_Nodes.gif (324.05 KiB) Viewed 767 times
Hi all, how can I search for all these circles with images and click on each one?
The real problem is that they change location and the image inside them changes too.
I tried using FINDTEXT, but the edges keep moving and it looks like they are different, even using the tolerance in the parameters.

Thanks!

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

Re: search for images disregarding what is in the center of the image

Post by boiler » 28 Nov 2023, 21:41

Disregarding the middle is the easy part. The *Trans option of ImageSearch will allow for that. Finding the outside that is dynamic and semi-transparent over an inconsistent background is the hard part.

User avatar
Datapoint
Posts: 314
Joined: 18 Mar 2018, 17:06

Re: search for images disregarding what is in the center of the image

Post by Datapoint » 28 Nov 2023, 22:03

You could search for the check mark. Just judging from the image, it looks like that doesn't change.

sakamoto
Posts: 7
Joined: 03 Oct 2022, 19:57

Re: search for images disregarding what is in the center of the image

Post by sakamoto » 04 Dec 2023, 21:00

boiler wrote:
28 Nov 2023, 21:41
Disregarding the middle is the easy part. The *Trans option of ImageSearch will allow for that. Finding the outside that is dynamic and semi-transparent over an inconsistent background is the hard part.
How can I set the middle as transparent if it is a round "image" with several colors?

sakamoto
Posts: 7
Joined: 03 Oct 2022, 19:57

Re: search for images disregarding what is in the center of the image

Post by sakamoto » 04 Dec 2023, 21:03

Datapoint wrote:
28 Nov 2023, 22:03
You could search for the check mark. Just judging from the image, it looks like that doesn't change.
unfortunately it changes, sometimes the check mark doesn't appear :cry:

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

Re: search for images disregarding what is in the center of the image

Post by boiler » 04 Dec 2023, 22:18

sakamoto wrote: How can I set the middle as transparent if it is a round "image" with several colors?
By coloring over the round part of the reference image with the defined transparent color. That’s exactly what the *Trans option is for.

User avatar
andymbody
Posts: 1027
Joined: 02 Jul 2017, 23:47

Re: search for images disregarding what is in the center of the image

Post by andymbody » 04 Dec 2023, 23:43

Correct me if I am wrong, but is it not true that most games are designed to prevent the very thing that is being requested here? Automation/Bots? I think it would stand to reason that the graphics are designed in such a way to make it nearly impossible to find anything static to "latch on to" for any length of time.

Or am I mistaken?

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

Re: search for images disregarding what is in the center of the image

Post by boiler » 05 Dec 2023, 00:01

You’re exactly right. That’s why I mentioned that the specific thing OP asked about is easy, but that doesn’t change the hard part that he won’t be able to solve.

User avatar
andymbody
Posts: 1027
Joined: 02 Jul 2017, 23:47

Re: search for images disregarding what is in the center of the image

Post by andymbody » 05 Dec 2023, 00:42

I was thinking some type of on-the-fly gaussian blur (maybe some averaging as well), with low-pass edge enhancement might be an idea to track general moving shapes, but they probably have that covered as well. Not to mention that the algorithm would have to be extremely fast to keep up with the constantly changing graphics.

I also never understood the point of playing a game by having a bot play it for you. Why bother with the game at all in that case? No offense OP or those seeking this type of solution... just never understood it (but I'm not a gamer). The only thing I can think of would be to out perform the other players as they try to out perform you by seeking the same advantage?

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

Re: search for images disregarding what is in the center of the image

Post by boiler » 05 Dec 2023, 05:28

Yes, just doing a simple ImageSearch can be too slow for many purposes. Any additional real-time image processing pretty much precludes using AHK except for static images. This one has no chance from what I can tell.

I am also not a gamer, so I can’t answer to the motivation. I suspect it’s just competitiveness in trying to move up the leader board or however success is measured these days.

Post Reply

Return to “Gaming Help (v1)”