Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
anybody pls help me on how to put a key to pause or close
#1
i am new in creating macro guys can anybody help me on how to create a hotkey to close a running macro??
if i run my macro i cant close it..
so i want to put a key to pause or close it thnx in advance.... :roll: :roll: :roll:
Code:
Copy      Help
Macro [b]Macro1[/b] [help1][/help1]
Trigger [b]SF9[/b] [help2][/help2]
[code]#region Recorded 7/26/2016 5:53:19 PM
int w1=act(win("CABAL" "D3D Window"))
rep
,key 1
,wait 0.5
,key f
,wait 0
,key 2
,wait 0.5
,key z
,wait 0.5
,key 3
,wait 0.5
,key 4
,wait 0
#endregion
;BEGIN PROJECT
;main_function  Macro1
;exe_file  $my qm$\Macro1.exe
;icon  <default>
;manifest  $qm$\default.exe.manifest
;flags  6
;guid  {DD06B965-AE0D-46BA-8EDA-BD4F51F003C3}
;END PROJECT
[/code]
#2
hotkey to close a running macro
Default hotkey is Pause.

See also: floating toolbar -> Keys -> Action "If key pressed".

,ifk(F12) break ;;if pressed key F12, exit the rep loop
#3
Macro Macro6
Code:
Copy      Help
#region Recorded 7/24/2016 8:44:33 AM
int w1=act(win("CABAL" "D3D Window"))
rep
,key f
,wait 0
,key z
,wait 0
,key 1
,wait 0.3
,key f
,wait 0
,key 2
,wait 1
,key f
,wait 0
,key 3
,wait 0.5
,key z
,wait 0
,key f
,wait 0
,key 4
,wait 0.4
,key f
,wait 0
,rig 1021 689 w1 1 ;; 'CABAL'
,ifk(F12) break ;;if pressed key F12, exit the rep loop
i do this is this correct?
sorry i dont know where to put it,
it keeps running if i press f12 it didnt stop :x :x
#4
ifk(F12) break is not good if the loop takes long time to execute.

Create new function (menu File -> New -> Function), assign the hotkey, paste this into the function:

Code:
Copy      Help
EndThread "Macro6"
#5
See also
Set end-thread hotkey
#6
Thnx a lot sir it works!! Big Grin Big Grin Big Grin Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)