Trying to create a Lclick that increases by one each time

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rjw524
Pro Scripter
Posts: 104
Joined: Wed May 09, 2012 9:45 pm
Location: Michigan

Trying to create a Lclick that increases by one each time

Post by rjw524 » Thu Aug 25, 2016 4:21 pm

Hi,

Can anyone tell me what is wrong the following macro:

Code: Select all

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1

Label>Start

SetFocus>Mouse Click Counter.xlsx

Press Down

Press CTRL
Send c
Release CTRL

WaitClipBoard
Wait>0.3
GetClipBoard>Test
StringReplace>Test,Tab,,Test
StringReplace>Test,CR,,Test
StringReplace>Test,LF,,Test

wait 1.0

SetFocus>maxthon*

Wait 1.0

Press CTRL
Send f
Release CTRL

wait 1.0

Send>view record

Wait 1.0

//Find and Left Click Middle Left of 
FindImagePos>%BMP_DIR%\image_1.bmp,SCREEN,0.7,7,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  MouseMove>XArr_0,YArr_0
  LClick * %Test%
Endif

Wait 1.0

Goto Start
It does everything correctly except increase the number of LClicks by the variable %Test%

Does the "* n" syntax not work with mouseclicks like it does other keystrokes?

Thanks,

rj

rjw524
Pro Scripter
Posts: 104
Joined: Wed May 09, 2012 9:45 pm
Location: Michigan

Re: Trying to create a Lclick that increases by one each tim

Post by rjw524 » Thu Aug 25, 2016 4:35 pm

Hi again,

Ok, I figured out a way to do it.

I just used a "repeat/until" using the variable %Test% as the Until qualifier instead of using the "lclick * n"

Works fine.

Jerryth31
Newbie
Posts: 19
Joined: Wed Jun 18, 2008 6:03 pm

Re: Trying to create a Lclick that increases by one each tim

Post by Jerryth31 » Fri Aug 26, 2016 3:01 pm

Just an FYI,
I have found that adding a small delay to LDown works much more consistently than LClick (at least with our software)

LDown
Wait>0.2
LUp

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