Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <AutoItConstants.au3>
- HotKeySet("{f1}", "myExit")
- Global $Counter = 1
- init(); changed all that to a function to call one time( readability)
- while 1
- $timer = timerinit()
- Do
- MouseClick("Left", 614, 532, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- sleep(2000)
- MouseClick("Left", 472, 333, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- sleep(2000)
- MouseClick("Left", 614, 532, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- sleep(2000)
- MouseClick("Left", 614, 532, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- sleep(2000)
- MouseClick("Left", 472, 333, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- sleep(2000)
- MouseClick("Left", 472, 333, 1, 2)
- sleep(500)
- MouseClick("Left", 713, 598, 1, 2)
- Call ( "myResult", $Counter )
- Sleep(2000)
- until timerdiff($timer) > 960;
- WEnd
- func myResult($Counter)
- ;ConsoleWrite(" Function myresult is called " & @CRLF)
- $Variable = PixelSearch(1240, 250, 1450, 420, 0x0E0E0E, 1)
- If IsArray($Variable) = True Then
- ConsoleWrite(" Red is found " & @CRLF)
- MouseClick("Left", 888, 597, 1, 1)
- MouseClick($MOUSE_CLICK_LEFT, $Variable[0], $Variable[1], $Counter)
- Else
- $Variable = PixelSearch(1240, 250, 1450, 420, 0x54835D, 1)
- If IsArray($Variable) = True Then
- ConsoleWrite(" 0x00B1C5 is found " & @CRLF)
- For $vElement In $Variable
- $Counter = $Counter * 2
- Next
- MouseClick($MOUSE_CLICK_LEFT, $Variable[0], $Variable[1], $Counter)
- EndIf
- EndIf
- EndFunc
- Func init()
- WinActivate("Identikit")
- WinWaitActive("Identikit", "", 10); wait for 10 sec to appear
- MouseClick("Left", 529, 594, 1, 1)
- sleep(4000)
- MouseWheel($MOUSE_WHEEL_DOWN, 2)
- sleep(500)
- MouseClick("Left", 755, 578, 1, 1)
- sleep(2000)
- MouseClick("Left", 823, 598, 1, 1)
- sleep(16000)
- MouseWheel($MOUSE_WHEEL_DOWN, 1)
- sleep(1000)
- EndFunc
- func myExit()
- Exit
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement