Problem With FindImagePos MouseMove to find position image

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Albertocc
Newbie
Posts: 2
Joined: Wed Apr 19, 2017 8:33 am

Problem With FindImagePos MouseMove to find position image

Post by Albertocc » Wed Apr 19, 2017 8:51 am

I'm trying to run the following script and it works fine, find the image. But I need to click where the position of it found the image, according to what I read return_offset gives me the position where it found the image but xArr_0 and yArr_0 give me the position 0,0 of the screen, not the position It found.
Thanks.

ScreenCapture>333,455,345,474,f:\temp\screen.bmp
Let>FIP_SCANPIXELS=20
FindImagePos>F:\temp\twopoint.bmp,F:\temp\screen.bmp,0,1,xArr,yArr,NumFound,CCOEFF

If>NumFound>0
MouseMove>xArr_0,yArr_0
EndIf

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

Re: Problem With FindImagePos MouseMove to find position ima

Post by Marcus Tettmar » Thu Apr 20, 2017 2:42 pm

This suggests the needle is found at 0,0 on the haystack image. Since this is taken from a portion of the screen that is not 0,0 in screen coordinates, but 0,0 relative to the top left point of the screen capture.

A much easier way to scan the screen is just to specify SCREE for the haystack. There's no need to use ScreenCapture.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Albertocc
Newbie
Posts: 2
Joined: Wed Apr 19, 2017 8:33 am

Re: Problem With FindImagePos MouseMove to find position ima

Post by Albertocc » Thu Apr 20, 2017 6:18 pm

Thank you very much for the answer.

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