Archon Posted February 17, 2010 Share Posted February 17, 2010 I have a problem. I made GUI, after clicking on its butto is called function with loop. I want to stop this loop by CRTL+w. Loop is working and sounds beep aftec hitting key. Who can tell me why this don't work? Global $WyjdzPetla=0 HotKeySet ("w","_wyjscie_z_petli") Func wewnetrzna() Local $czas,$plik,$x,$y $plik=FileOpen("tab.txt",1) While ($WyjdzPetla=0) $czas=TimerInit() OdczytMini() $czas=Round(TimerDiff($czas)) FileWrite($plik, $czas & @CRLF) For $x=0 To 278 Step 1 For $y=0 To 221 Step 1 FileWrite($plik, $MiniMapa[$x][$y]) Next FileWrite($plik, @CRLF) Next Sleep(100) WEnd FileClose($plik) $WyjdzPetla=0 EndFunc Func _wyjscie_z_petli() $WyjdzPetla = 1 EndFunc Link to comment Share on other sites More sharing options...
Akshay07 Posted February 17, 2010 Share Posted February 17, 2010 (edited) Shouldn't it be HotKeySet ("^w","_wyjscie_z_petli") for CTRL+w, instead of HotKeySet ("w","_wyjscie_z_petli")? The help shows an example of different keys combination: HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d Edited February 17, 2010 by Akshay07 Link to comment Share on other sites More sharing options...
Archon Posted February 17, 2010 Author Share Posted February 17, 2010 (edited) yes, you right but none hotkey works. Alone 'a' or CRTL+a It doesn't matter Problem still exist. Edit: I've just found my mistake, external program was blocking in some way all keys Anyway, thx. Edited February 17, 2010 by Archon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now