Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Local $cInput, $cLogin, $sRead, $nMsg
- Local $fGo = False
- Opt("GUIOnEventMode", 1)
- GUICreate("", 220, 100)
- GUISetOnEvent(-3,"_OnEventHandler")
- GUISetState()
- $cInput = GUICtrlCreateInput("", "10", "10")
- $cLogin = GUICtrlCreateButton("Start", 70, 30, 80, 20)
- GUICtrlSetOnEvent(-1,"_OnEventHandler")
- While Sleep(10)
- If $fGo Then
- $sRead = GUICtrlRead($cInput)
- ControlSend("World of Warcraft", "", "", $sRead)
- Sleep(1000)
- EndIf
- WEnd
- Func _OnEventHandler()
- $nMsg = @GUI_CtrlId
- Switch $nMsg
- Case -3
- Exit
- Case $cLogin
- $fGo = Not $fGo
- ;~ If $fGo Then GUICtrlSetData($cLogin, "Stop")
- ;~ If Not $fGo Then GUICtrlSetData($cLogin, "Start")
- EndSwitch
- EndFunc ;==>_OnEventHandler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement