Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

can't exit loop

$
0
0
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

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>