FindImagePos/WaitScreenImage issue

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
tigaturtle
Newbie
Posts: 2
Joined: Sat Nov 05, 2016 11:14 am

FindImagePos/WaitScreenImage issue

Post by tigaturtle » Sat Nov 05, 2016 11:27 am

FindImagePos always returns 1 even if the image is not yet displayed in the window. This results in random clicking and uncontrolled script execution.
I tried the SCREEN option and the WINDOW option, I tried several precision values etc. All resulted in the same issue.
The script worked for a couple of weeks now it works sometimes after a PC restart for 5-10 executions.

Here my code example:

// First WaitScreen + FindImage works fine

WaitScreenImage>%BMP_DIR%\image_65.bmp,0.7,CCOEFF

FindImagePos>%BMP_DIR%\image_65.bmp,WINDOW:Mobizen Mirroring,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif

// 2nd WaitScreenImage does not wait and continues directly

WaitScreenImage>%BMP_DIR%\image_75.bmp,0.7,CCOEFF

FindImagePos>%BMP_DIR%\image_77.bmp,WINDOW:Mobizen Mirroring,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
EndIf

... (several FindImagePos / WaitScreenImage to follow)

Anyone had the same issue?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: FindImagePos/WaitScreenImage issue

Post by Marcus Tettmar » Mon Nov 07, 2016 10:00 am

If it returns one it has found a match. If you don't see it then you have a false positive. Maybe you need to make your needle image more defined. Capture less background for example, make it smaller, remove any chance of it being confused with something else. Or consider using the EXACT matching method.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

tigaturtle
Newbie
Posts: 2
Joined: Sat Nov 05, 2016 11:14 am

Re: FindImagePos/WaitScreenImage issue

Post by tigaturtle » Mon Nov 07, 2016 6:24 pm

Thanks for the reply.

EXACT did not work. I took once again the pictures and it works fine now.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts