Please help me with this simple one

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
zQne
Newbie
Posts: 1
Joined: Thu Oct 19, 2017 12:45 pm

Please help me with this simple one

Post by zQne » Thu Oct 19, 2017 12:48 pm

Hey, first off i love this macro scheduler, been playing around with it for hours now.

However now i need help.
I need to repeat this Mousemove for 30 times before the script goes to eat label, however it just repeat all over again, what am i missing?

OR, make the label>start run for XX seconds before it goes to eat label then back to start label?

label>start
Let>BM=1
Let>BM=BM+1
repeat>BM
wait>0.4
MouseMove>405,299
wait>0.1
RDown
wait>0.1
MouseMove>429,302
wait>0.1
MouseMove>430,335
wait>0.1
MouseMove>421,362
wait>0.1
MouseMove>397,360
wait>0.1
MouseMove>365,355
wait>0.1
MouseMove>368,319
wait>0.1
MouseMove>364,292
wait>0.1
if>BM<,3
goto>start
until>BM=3
goto>eat

label>eat
wait>1
Press>del
wait>1
Press>del
wait>1
goto>start

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Please help me with this simple one

Post by JRL » Thu Oct 19, 2017 4:55 pm

See help for If>.
Try this

Code: Select all

Label>start
Let>BM=1
Let>BM=BM+1
repeat>BM
wait>0.4
MouseMove>405,299
wait>0.1
RDown
wait>0.1
MouseMove>429,302
wait>0.1
MouseMove>430,335
wait>0.1
MouseMove>421,362
wait>0.1
MouseMove>397,360
wait>0.1
MouseMove>365,355
wait>0.1
MouseMove>368,319
wait>0.1
MouseMove>364,292
wait>0.1
if>{%BM%<3}
goto>start
EndIf
goto>eat

label>eat
wait>1
Press>del
wait>1
Press>del
wait>1
goto>start

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Please help me with this simple one

Post by mightycpa » Thu Oct 19, 2017 7:28 pm

Hi,

I'm going to offer this for future reference. You are adding 1 to your repeat variable outside of the repeat loop. If you keep everything in the repeat loop, and do this instead, it makes a little more sense, and it's simpler too:

Code: Select all

Let>a=0
Repeat>a
  Do>Whatever you're going to do, then at the end
  Add>a,1
Until>a=3
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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