Jump to content
Sign in to follow this  
kadauchi

Start/Stop

Recommended Posts

kadauchi

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

#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 by kadauchi

Share this post


Link to post
Share on other sites
ileandros

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 by ileandros

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites
somdcomputerguy

Or ExitLoop 2 (both of the ExitLoop calls..) not tested, but I'm pretty sure..

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
ileandros

but I'm pretty sure..

Guess again!

I feel nothing.It feels great.

Share this post


Link to post
Share on other sites
somdcomputerguy

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.