Hello!
I'm trying to build a simple wow "bot" to automate a few things (Such as send X key every X seconds to wow) I'm stuck at the infinite loop, where my Stop/exit buttons render completely useless.
Here is my code:
I'm trying to build a simple wow "bot" to automate a few things (Such as send X key every X seconds to wow) I'm stuck at the infinite loop, where my Stop/exit buttons render completely useless.
Here is my code:
Code:
#include <INet.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#Include <GuiEdit.au3>
#include <Constants.au3>
#include <GUImenu.au3>
#include <File.au3>
#include <Array.au3>
Global $running = 0
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AutoButton", 340, 60, 500, 500)
$Start = GUICtrlCreateButton("Start", 10, 15, 100, 30)
$Stop = GUICtrlCreateButton("Stop", 120, 15, 100, 30)
$Exit = GUICtrlCreateButton("Exit", 230, 15, 100, 30)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$msg = GUIGetMsg()
Select
Case $msg = $Start
While 1
ControlSend( "World of Warcraft", "", "", "{SPACE}" )
Sleep(1000)
WEnd
Case $msg = $Stop
ExitLoop
Case $msg = $Exit
GUIDelete()
ExitLoop
Exit
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
Exit
EndSelect
WEnd