Could someone pls show me how to write loops?
as im looking to PRESS down 13 times.
and also where can i find some documentation on the if statements.
Many thanks,
Ben
Could someone pls show me how to write loops?
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can just do this:
Press Down * 13
But if that's too fast and you want a pause between each one (and by way of demonstrating a Repeat/Until loop):
The really simple way to make a loop is just use a Label and a Goto. This is an infinite loop:
Label>start
..
.. do something
..
Goto>start
With a variable kounter and an If statement it can be made finite. But a Repeat/Until is nicer.
You'll find documentation on the If statements in the help file. Hit F1. In the Command Reference section under Conditional Commands you will find a topic on "If".
Or just type If> in the editor and hit F1 while on that line.
Press Down * 13
But if that's too fast and you want a pause between each one (and by way of demonstrating a Repeat/Until loop):
Code: Select all
Let>k=0
Repeat>k
Press Down
Wait>0.5
Let>k=k+1
Until>k=13
Label>start
..
.. do something
..
Goto>start
With a variable kounter and an If statement it can be made finite. But a Repeat/Until is nicer.
You'll find documentation on the If statements in the help file. Hit F1. In the Command Reference section under Conditional Commands you will find a topic on "If".
Or just type If> in the editor and hit F1 while on that line.
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?