kadauchi Posted December 26, 2012 Posted December 26, 2012 (edited) I've spent the last 3 hours looking at examples, testing them and everything else i could do myself. I can get the start button to work properly but cannot get stop to work =(. Here is the code expandcollapse popup#include #include GUICreate("Plugin", 300, 145) GUISetState(@SW_SHOW) GUICtrlCreateLabel("Interact Keybind", 18, 10) $InteractKey = GUICtrlCreateInput("f", 150, 8, 120) GUICtrlCreateLabel("Teleport Next Keybind", 18, 44) $TeleportNextKey = GUICtrlCreateInput("{NUMPAD7}", 150, 40, 120) GUICtrlCreateLabel("Syncing Ability", 18, 78) $SyncingAbility = GUICtrlCreateInput("", 150, 74, 120) $startbutton = GUICtrlCreateButton("Start", 18, 110, 120) $stopbutton = GUICtrlCreateButton("Stop", 150, 110, 120) While 1 $msg = GUIGetMsg() Select Case $msg = $startbutton $send1 = GUICtrlRead($InteractKey) $send2 = GUICtrlRead($TeleportNextKey) $send3 = GUICtrlRead($SyncingAbility) While 1 if Winactive("abc") = 0 Then Winactivate("abc") Endif Send($send1); Sleep(3000) Send($send2); Sleep(500) Send($send3); Sleep(1000) Wend Case $msg = $stopbutton ExitLoop Case $msg = $GUI_EVENT_CLOSE GUIDelete () ExitLoop EndSelect Wend Edited December 26, 2012 by kadauchi
ileandros Posted December 27, 2012 Posted December 27, 2012 (edited) Use a Do...Untik loop here insted of reusing while loop Case $msg = $startbutton $send1 = GUICtrlRead($InteractKey) $send2 = GUICtrlRead($TeleportNextKey) $send3 = GUICtrlRead($SyncingAbility) While 1 if Winactive("abc") = 0 Then Winactivate("abc") Endif Send($send1); Sleep(3000) Send($send2); Sleep(500) Send($send3); Sleep(1000) Wend You never exit that loop. Since your start button is pressed ur script is blocked Edit: This looks like a game bot script regarding the names of ur inputs. It better is not Edited December 27, 2012 by ileandros I feel nothing.It feels great.
somdcomputerguy Posted December 27, 2012 Posted December 27, 2012 (edited) Or ExitLoop 2 (both of the ExitLoop calls..) not tested, but I'm pretty sure.. Edited December 27, 2012 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
ileandros Posted December 27, 2012 Posted December 27, 2012 but I'm pretty sure..Guess again! I feel nothing.It feels great.
somdcomputerguy Posted December 27, 2012 Posted December 27, 2012 I see. I misread the code (or browsed thru it too fast), I thought that second While loop was within the first.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
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