help please. i want this program . when i press 7 num this program call sloop function. and when i press a .the program exit from sloop function and the main program still running. my problem is. i can't exit loop from sloop function.
thanks
#include <misc.au3>
$dll = DllOpen("user32.dll")
while 1
if _IsPressed(67) then ;numeric key 7
While _IsPressed("67", $dll)
Sleep(10)
WEnd
sloop()
EndIf
WEnd
Func sloop()
while 1
Send("{1}")
sleep(5000)
send("{2}")
sleep(5000)
if _IsPressed(41) then ; press a and exit loop and back to main program
ExitLoop
EndIf
WEnd
EndFunc
thanks
#include <misc.au3>
$dll = DllOpen("user32.dll")
while 1
if _IsPressed(67) then ;numeric key 7
While _IsPressed("67", $dll)
Sleep(10)
WEnd
sloop()
EndIf
WEnd
Func sloop()
while 1
Send("{1}")
sleep(5000)
send("{2}")
sleep(5000)
if _IsPressed(41) then ; press a and exit loop and back to main program
ExitLoop
EndIf
WEnd
EndFunc