Wild mouse moving

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Chapter7
Newbie
Posts: 2
Joined: Sun Sep 25, 2016 1:22 pm

Wild mouse moving

Post by Chapter7 » Sun Sep 25, 2016 2:04 pm

I do not know why the script that I made today suddenly behave strangely. During the command "WaitScreenImage",my mouse pointer move & click randomly.

Here is my script:

Repeat>tillComplete
let>tillComplete=1
WaitScreenImage>% BMP_DIR% \ image_2.bmp, 0.7, CCOEFF
FindImagePos>% BMP_DIR% \ image_2.bmp, SCREEN, 0.7,1, XArr, Yarr, NumFound, CCOEFF
   If> NumFound> 0
     MouseMove> XArr_0, YArr_0
     wait> 1
     LClick
     // at this step, mouse will moving & leftclick randomly
     WaitScreenImage>% BMP_DIR% \ image_3.bmp, 0.7, CCOEFF
FindImagePos>% BMP_DIR% \ image_3.bmp, SCREEN, 0.7,1, XArr, Yarr, NumFound, CCOEFF
   If> NumFound> 0
let>tillComplete=0
endif
endif
until>tillComplete,1


How to solve this probem ?

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

Re: Wild mouse moving

Post by Marcus Tettmar » Mon Sep 26, 2016 7:58 am

Impossible to say. Use the debugger.

Also, are those spaces intentional? Even if you are using the IGNORESPACES directive the spaces in the paths will be a problem.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Chapter7
Newbie
Posts: 2
Joined: Sun Sep 25, 2016 1:22 pm

Re: Wild mouse moving

Post by Chapter7 » Tue Sep 27, 2016 2:46 am

Finally, I found that the cause of the error is false positive in:

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

after change into

WaitScreenImage>% BMP_DIR% \image_2.bmp, 50, EXACT

the problem does not happen again.

Just wondering why "WaitScreenImage" give false positive result when try to search this image.

Image

from this screen :

http://i.imgur.com/jM8z7gS.png

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

Re: Wild mouse moving

Post by Marcus Tettmar » Tue Sep 27, 2016 9:10 am

Because it's nearly all blue background. Statistically it could match lots of blue area. I would advise that you recapture it, tighter to the center, so you have less of the background.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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