Total newb here.
I have a scrip that is about 1200 lines long. It runs perfectly and when it's done, I have to make a simple click to take me to a new location and then run the same exact 1200 line script again. I have to do this 12 times.
These interim clicks are in different locations, so I can't just loop the script. I could probably have one giant script that includes the interim clicks, but I assume there is a better way.
What should I do to run my script and then read from another macro which will give the location changing click and then go back to the original, and so on until it has run all 12 times? I hope this makes sense.
Thank you very much.
Maybe a branch question???
Moderators: Dorian (MJT support), JRL
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Place your script in the space provided and see if this works for you. You should be able to loop through your script as many times as needed. I don't know what you want to do to end the script. Perhaps add a counter if you have a specific number of points to select. Or perhaps use the Ask> function each loop and ask if you are finished.
Code: Select all
Let>ScriptIsRunningFlag=0
OnEvent>Key_down,VK1,0,SetScriptIsRunningFlag
SRT>SetScriptIsRunningFlag
If>ScriptIsRunningFlag=0
Let>ScriptIsRunningFlag=1
EndIf
END>SetScriptIsRunningFlag
Label>WaitingForMouseClick
Wait>0.01
If>ScriptIsRunningFlag=1
Goto>StartScript
EndIf
Goto>WaitingForMouseClick
Label>StartScript
/////////////////////////Start 1200 line working script
/////// Your script here ///////
/////////////////////////End 1200 line working script
Let>ScriptIsRunningFlag=0
Goto>WaitingForMouseClick