Posts: 5
Threads: 1
Joined: Dec 2011
Hi,
I created a macro that I would like to loop continuously...I can't figure out how to structure the script to accomplish this.
I tried starting out with "rep 3" and ending with "break" which didn't work......I also tried a couple other things like "for 3" and "endfor" and "while"/"endwhile".
Can't figure this out - any help would be appreciated. Thanks.
Posts: 12,090
Threads: 142
Joined: Dec 2002
Posts: 5
Threads: 1
Joined: Dec 2011
Hi Gintaras,
I tried doing what you said, but I couldn't get it to work. I'm sure I'm doing something wrong.
I started the script with: rep
next line: out "my script"
ended with wait 1
There was an error on the second line.
Posts: 12,090
Threads: 142
Joined: Dec 2002
what error it was? if "emty block...", select lines that follow rep and press Tab.
rep
out "my script" ;;error
wait 1
rep
,out "my script" ;;good
,wait 1
Posts: 5
Threads: 1
Joined: Dec 2011
ok I'll try this. Two questions though
What does the "out" function do? (i don't see it defined anywhere in the literature)
and what do the commas do?
Posts: 12,090
Threads: 142
Joined: Dec 2002
out shows something in QM output. Useful to test/debug macro.
commas or tabs tell to repeat these lines, when rep is before.
Posts: 5
Threads: 1
Joined: Dec 2011
oh ok. thank you.
does this mean I have to put a comma before every line of the script I wish to repeat?
Posts: 12,090
Threads: 142
Joined: Dec 2002
Tab or comma. Only in lines followed by rep or for. You probably noticed, that QM adds a tab when you type rep and press Enter.
rep
,repeat this
,repeat this
don't repeat this
Posts: 5
Threads: 1
Joined: Dec 2011
okay cool, I just got it working with a sample script. Let's see if i can get the actual one working.
one more thing....is there a hotkey I can press to get it to stop the macro? My sample script was so fast and stuck on loop I almost had to shut off my computer to terminate it lol. thanks a lot.
Posts: 12,090
Threads: 142
Joined: Dec 2002