If you want to exit the loop simple add ExitLoop after a Button-Case to do so.
can't, i tried exitloop a few times but it still run the loop
i tried
Quote:
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Ready()
Case $Button2
ExitLoop
Case $Checkbox1
_Hack()
EndSwitch
WEnd
Func _Ready()
While 1
ControlSend(title, "", "", "{5}")
WEnd
EndFunc
Which loop do you want to exit. The GUI-loop or the While 1 - ControlSend - WEnd Loop?
If you want to exit the ControlSend loop you have to enable GUIOnEventMode and transfer the event of $Button2 into a function where you set a variable true / false which gets checked every time in the ControlSend loop.
Global $sendKey = False
While Sleep(10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$sendKey = Not $sendKey
Case $Checkbox1
_Hack()
EndSwitch
If $sendKey Then
ControlSend("title", "", "", "{5}")
EndIf
WEnd
Global $sendKey = False
While Sleep(10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$sendKey = Not $sendKey
Case $Checkbox1
_Hack()
EndSwitch
If $sendKey Then
ControlSend("title", "", "", "{5}")
EndIf
WEnd
I was just wondering if there is a program that i can make a bot for 4story because none of these auto click or auto keyboard (autoit included) working during in the game windows.You are a wise guy lol if you have a second to spare for an answer i would be appreciate.
"alles Exit Button" Frage! 06/11/2011 - General Coding - 7 Replies Hey Leute ,
ich hatte letztens die Idee ein Tool zu schreiben mit dem man alle Programme beendet und dann den PC runter fährt.
Ich weiß leider keine Programmiersprache in der man das verwirklichen könnte.
Wisst ihr wie man das macht?
[Help] ShopSale Exit Button 01/30/2010 - CO2 Private Server - 5 Replies Please...
I've maked the sales working fully... but the exit button don't appears..... what should i do to make it work?? i've tryied many things : X
Agbot loop dosnt loop 10/18/2008 - Silkroad Online - 1 Replies my agbot after i tele will go through the 20 sec wait then says in bot concle feature not available yet
feature not available yet
idk whats wrong
Exit sometimes... Didnt write anithing just exit... PLS HELP 11/23/2007 - Silkroad Online - 1 Replies The problem is :
I can play for a few minutes and after just exit Didnt write out anithnig...
What can i do?
What will be the problem ?
Pls help For me!
TY