Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.30 KB | None | 0 0
  1. #include <GuiComboBox.au3>
  2. #include <SendMessage.au3>
  3. #include <WindowsConstants.au3>
  4. #include <Constants.au3>
  5. Opt("WinTitleMatchMode", 1)
  6. $mode = InputBox("Mode","3 = Gatherer, 4 = Grinder");
  7. While 1
  8.    if ProcessExists("The Noob Bot.exe") then
  9.       Sleep(1504)
  10.    Else
  11.       ProcessClose("firefox.exe")
  12.       ShellExecute("The Noob Bot.exe")
  13.       WinWaitActive("Login - The Noob Bot")
  14.       Sleep(2000)
  15.       ClickButton("Login - The Noob Bot", "Launch TNB")
  16.       WinWaitActive("Error")
  17.       ClickButton("Error","OK")
  18.       WinWaitActive("Trial version")
  19.       ClickButton("Trial version", "OK")
  20.       WinWaitActive("The Noob Bot -")
  21.       $hCombo = ControlGetHandle("The Noob Bot -", "", "[TEXT:; INSTANCE:1]")
  22.      
  23.       Do
  24.          _GUICtrlComboBox_SetCurSel($hCombo, $mode)
  25.       Until _GUICtrlComboBox_GetCurSel($hCombo) = $mode
  26.       GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
  27.       $iCode = $CBN_SELCHANGE
  28.       $val = BitShift($iCode, -16)
  29.       $winHandle = WinGetHandle("The Noob Bot -", "")
  30.       _SendMessage($winHandle, $WM_COMMAND, $val, $hCombo)
  31.       Sleep(1000)
  32.       ClickButton("The Noob Bot -", "Start")
  33.       WinWaitActive("Load Profile ")
  34.       ClickButton("Load Profile ", "Load Profile")
  35.    EndIf     
  36. WEnd
  37.  
  38. Func ClickButton($title, $text)
  39.    Local $r = 0
  40.    Do
  41.       $r = ControlClick($title, "" , $text, "LEFT")
  42.    Until $r = 1
  43. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement