Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to stop a macro
#1
Hello i just start to using this software so i want to know how i can stop running a function macro? because my macro just continous until he does all the actions.
#2
Right-click the function in QM window -> Running items -> Threads.
Or right-click QM tray icon and select Threads.
#3
Ok, but there is a way to stop the macro with some kind of hotkeys or with a code within the own script?
#4
If it is a function, the 'End macro' hotkey does not work. And there is no 'End function' hotkey. If need, create another function that ends the first function, and assign it a keyboard trigger. Example:
Function end_Function299
Trigger CSe     Help - how to add the trigger to the macro
Code:
Copy      Help
;Ends thread of Function299 when you press Ctrl+Shift+E.

EndThread "Function299"

Quote:or with a code within the own script
Use ret. Or break, if in a loop.
Example:
Function Function300
Code:
Copy      Help
;Displays 0, 1, 2...
;Ends when Ctrl pressed.

int i
for i 0 1000000000
,0.1
,ifk(C) ret
,out i
#5
Thank you very much. Just one little doubt more, the last code is written at the end of the script or at the beginning?
#6
It is full script. The code does not set a hotkey to end macro. It is just an example how a script itself can check if a key is pressed and then end (ret).
#7
Ok thank you very much for your help, i will test it right now


Forum Jump:


Users browsing this thread: 1 Guest(s)