Jump to content

Start/Stop


kadauchi
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...