Image Search Issues

Advanced Macro Recorder/Editor.

Moderator: Pulover

RyanA
Posts: 4
Joined: 21 Dec 2020, 14:54

Image Search Issues

21 Dec 2020, 15:19

About Me: Reasonably Advanced Macro Creator. 20 years experience. Coming here out of a total loss of what to do next. I solved this issue before but it was on accident, and this AM I accidently overwrote the macro, and lost it. I'm trying to recreate it in a more sound manner I can't.

Challenge:
Using Memu Play on PC:
I created an image search that is bafflingly inconsistent. The image is a player ID number, about 20 digits long, that appears in one of two distinct places. If I make a fresh search, with a fresh screen capture of the region and the number it works perfectly. If I reload the game it fails...despite the screen capture being the same!

I had the same problem on 12/8/2020 but I figured it out... and I have no idea what I did... Every other image search works fine.
Now that I have to do it again, I am baffled. It's like there is a watermark that I can't see that is messing up the image recognition. If I take a fresh region with a fresh sampled image, it works perfectly... but doesn't work a second time? Is this even possible? I somehow go it to work for me for weeks... now I'm lost again. Please help!
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Image Search Issues

21 Dec 2020, 16:46

Use WinActivate to make sure the target window is in the foreground, otherwise ImageSearch won't work. And try to add some variation. That's about all I can say to help you.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
RyanA
Posts: 4
Joined: 21 Dec 2020, 14:54

Re: Image Search Issues

21 Dec 2020, 17:21

UPDATE:
So I made this as simple as possible.
I only wanted to reliably find the Player ID in one location, and make a sound when found.
The region is:
270x320
620x340

This represents a capture area of 350x20.
The first time through, I screenshotted this area, and saved it as Capture 1.
A search for Capture 1 in the area worked perfectly, and it beeped as requested.

The second time through, it did not work.
So I surgically recaptured the area, and saved this new screenshot area as Capture 2.
(Mind you...this is the exact same area and contents as Capture 1)
The image search worked perfectly, found the image, and beeped as requested.

I switched back to the command line that searched for Capture 1 and it would NOT find the image and beep!?!?!?!?!

So this HAS to be some kind of water mark right?
So I pulled Capture 1 and Capture 2 into Photoshop, and layered them on top of one another...zoomed at at 200%, 800% even 1200% and turned off the front layer looking for anything different! But they are the same damn image!? Nothing is different about them in any way. Please help.
RyanA
Posts: 4
Joined: 21 Dec 2020, 14:54

Re: Image Search Issues

21 Dec 2020, 17:23

Pulover wrote:
21 Dec 2020, 16:46
Use WinActivate to make sure the target window is in the foreground, otherwise ImageSearch won't work. And try to add some variation. That's about all I can say to help you.
Yes sir! I am using WinActivate as my first command. Along with it's built in delay of 333ms. I even added full second pause after than and before the first command.
RyanA
Posts: 4
Joined: 21 Dec 2020, 14:54

Re: Image Search Issues

21 Dec 2020, 17:33

UPDATE 2:
Mr. Rodolfo U. Batista was kind enough to reply above... his suggestion was to add use WinActivate, which I already was (this is smart if you don't use this yet, you should) and to add some variations.
What I can report is that adding Variations=1 was not enough to get Capture 1 to work on Capture 2. But Variations 2 or more seems to work just fine! The images appear to be by the pixel to be identical, so it could just be a small bug that variations makes work? I don't know much about the nuts and bolts of variations, but it appears to work with that minor change!

THANK YOU SO MUCH MR. BATISTA!
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Image Search Issues

21 Dec 2020, 20:47

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 28 guests