My Objective: I want MS to find the correct image, and click on it.
But no matter what the settings, it either doesn't find it or selects the wrong one. I have tried to figure this out for a week and stumped.
If I run Debug, and click thru each line, it finds the correct image everytime. So I have slowed down the code by putting Waits, but still finds wrong image when code is run from the beginning.
I have attached the image I want (monster.bmp) and the image it always chooses (when start from beginning) (5mTrend.bmp ). But I had to attached the png files as bmps are not allowed.
I have tried to set it to Exact with setting of 0-50, in increments of 5. I have set to Cooeff with setting 1-0.7. It still finds the wrong image. I have tried Screen, window, and even a rectangle.
I have also attached the code .
Cannot recognize the correct image
Moderators: JRL, Dorian (MJT support)
Re: Cannot recognize the correct image
It only allowed 1 attachment.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Cannot recognize the correct image
I noticed in your other FindImagePos SRTs you have a tolerance of 50, but this one is 0. Of course with 0 this means a perfect match is required. What happens if you increase your tolerance?
Re: Cannot recognize the correct image
Yes. That was testing in debug mode. I was testing what tolerance works. In Debug mode, up to 50 works. Then when run macro from beginning with Start, it will recognize the other image.
That is why I reduced that one to 0,to see if "an exact match" would fix it. But it still would click on the 5mTrend image, even at 0 tolerance.
That is why I reduced that one to 0,to see if "an exact match" would fix it. But it still would click on the 5mTrend image, even at 0 tolerance.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Cannot recognize the correct image
Do you know for sure it's jumping to that subroutine? Try turning logging on to to make sure it's actually looking for that image in the first place. If it isn't, that will explain why it'll find it when you debug that isolated part of the script, but doesn't when you run the whole thing.