Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <AutoItConstants.au3>
- #include <ImageSearch 64 bit/ImageSearch.au3>
- #include <Misc.au3>
- #include <ImageSearch.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 = _ImageSearch("quinto.bmp",$x,$y,100) Or _ImageSearch("quarto.bmp",$x,$y,100)
- If IsArray($Variable) = True Then
- ConsoleWrite(" Win is found " & @CRLF)
- MouseClick("Left", 888, 597, 1, 1)
- MouseClick($MOUSE_CLICK_LEFT, $Variable[0], $Variable[1], $Counter)
- Else
- $Variable = _ImageSearch("primo.bmp",$x,$y,100) Or _ImageSearch("secondo.bmp",$x,$y,100) Or _ImageSearch("terzo.bmp",$x,$y,100)
- If IsArray($Variable) = True Then
- ConsoleWrite(" no win 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