Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.72 KB | None | 0 0
  1. Local $cInput, $cLogin, $sRead, $nMsg
  2. Local $fGo = False
  3.  
  4. Opt("GUIOnEventMode", 1)
  5.  
  6. GUICreate("", 220, 100)
  7. GUISetOnEvent(-3,"_OnEventHandler")
  8. GUISetState()
  9.  
  10. $cInput = GUICtrlCreateInput("", "10", "10")
  11. $cLogin = GUICtrlCreateButton("Start", 70, 30, 80, 20)
  12. GUICtrlSetOnEvent(-1,"_OnEventHandler")
  13.  
  14.  
  15. While Sleep(10)
  16.     If $fGo Then
  17.         $sRead = GUICtrlRead($cInput)
  18.         ControlSend("World of Warcraft", "", "", $sRead)
  19.         Sleep(1000)
  20.     EndIf
  21. WEnd
  22.  
  23. Func _OnEventHandler()
  24.     $nMsg = @GUI_CtrlId
  25.     Switch $nMsg
  26.         Case -3
  27.             Exit
  28.         Case $cLogin
  29.             $fGo = Not $fGo
  30.            
  31. ;~          If $fGo Then GUICtrlSetData($cLogin, "Stop")
  32. ;~          If Not $fGo Then GUICtrlSetData($cLogin, "Start")
  33.     EndSwitch
  34. EndFunc   ;==>_OnEventHandler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement