mak364 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
ok so ive made my GUI ive got my macro working when i press start on it now i just need to make a hotkey that starts it and stops and i havnt got a clue how to do it, anyone got any ideas?
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
HotKeySet("{PAUSE}", "_Toggle") ; "Pause break" key
$RunScript = False ;controls when the script enters and exits the while loop that contains the macro
while 1
sleep (50)
while $RunScript = True
sleep(1)
;ADD YOUR MACRO HERE
WEnd
WEnd
Func _Toggle() ;changes $runscript to the opposite of what it currently is
If $Runscript = False Then
$RunScript = True
Else
$Runscript = False
EndIf
EndFunc
if you need any help reading or understanding the code, just ask.