Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GuiComboBox.au3>
- #include <SendMessage.au3>
- #include <WindowsConstants.au3>
- #include <Constants.au3>
- Opt("WinTitleMatchMode", 1)
- $mode = InputBox("Mode","3 = Gatherer, 4 = Grinder");
- While 1
- if ProcessExists("The Noob Bot.exe") then
- Sleep(1504)
- Else
- ProcessClose("firefox.exe")
- ShellExecute("The Noob Bot.exe")
- WinWaitActive("Login - The Noob Bot")
- Sleep(2000)
- ClickButton("Login - The Noob Bot", "Launch TNB")
- WinWaitActive("Error")
- ClickButton("Error","OK")
- WinWaitActive("Trial version")
- ClickButton("Trial version", "OK")
- WinWaitActive("The Noob Bot -")
- $hCombo = ControlGetHandle("The Noob Bot -", "", "[TEXT:; INSTANCE:1]")
- Do
- _GUICtrlComboBox_SetCurSel($hCombo, $mode)
- Until _GUICtrlComboBox_GetCurSel($hCombo) = $mode
- GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
- $iCode = $CBN_SELCHANGE
- $val = BitShift($iCode, -16)
- $winHandle = WinGetHandle("The Noob Bot -", "")
- _SendMessage($winHandle, $WM_COMMAND, $val, $hCombo)
- Sleep(1000)
- ClickButton("The Noob Bot -", "Start")
- WinWaitActive("Load Profile ")
- ClickButton("Load Profile ", "Load Profile")
- EndIf
- WEnd
- Func ClickButton($title, $text)
- Local $r = 0
- Do
- $r = ControlClick($title, "" , $text, "LEFT")
- Until $r = 1
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement