I have just started trying out this macro and I wrote a script that only includes mouse movements and clicks.
I did get the script to work, but I want the script to continuously repeat itself (or a, by me, decided number of times) and I do not understand the repeat function.
Thanks in advance / Leeber
Repeat question
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
If you want to repeat continuously for ever (or until YOU stop the macro) then just use a simple Label and Goto:
Repeat/Until is designed to repeat *until* some condition. E.g. the following will repeat until k is 10:
Now, you *could* use a Repeat/Until to loop forever by making sure the condition is never realised:
Since k is never set to 10 that loop would loop ad infinitum but it seems a bit inelegant to me. You could also say something like:
But, you might just as well use a simple Label and Goto.
Hope this helps.
Code: Select all
Label>start
..
.. your stuff here
..
Goto>start
Code: Select all
Let>k=1
Repeat>k
.. do something
Let>k=k+1
Until>k=10
Code: Select all
Repeat>k
.. do something
Until>k=10
Code: Select all
Let>continue=TRUE
Repeat>continue
..
Until>continue=FALSE
Hope this helps.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Shift-Esc is the default stop key. See Tools/Options. Or you can right click on the flashing tray icon and select Stop, or click Stop on the main window.
Might also help to have a small pause in your loop so that it is not running too tightly:
Label>start
..
..
Wait>0.5
Goto>start
Might also help to have a small pause in your loop so that it is not running too tightly:
Label>start
..
..
Wait>0.5
Goto>start
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?