Got it from a Russian forum.
There are no binaries included, except for 2 SearchImage Dlls in the archive.
Test this out and report back, help each other to make this more suitable for everyone's needs.
SOURCE CODE
AUTOSPACE.AU3
Code:
#RequireAdmin
; Press Esc to terminate script, Pause/Break to "pause"
#include <AutoItConstants.au3>
Opt("SendKeyDownDelay", 15)
HotKeySet("{PAUSE}", "TogglePause")
$dll = DllOpen("user32.dll")
AutoItSetOption("CaretCoordMode", 1)
AutoItSetOption("MouseCoordMode", 1)
AutoItSetOption("PixelCoordMode", 1)
$gap = 57
$stick = 0
;;;; Body of program would go here;;;;
Sleep(3000)
While 1
$aCoord = PixelSearch(1216, 115, 1227, 128, 0xE20000, 40, 1)
If not @error Then
Send("{LCTRL}")
Sleep(1500)
Send("i")
Sleep(2000)
If($stick<=8) Then
MouseMove(1210+($gap*$stick), 498)
Sleep(1000)
MouseDown($MOUSE_CLICK_RIGHT)
Sleep(100)
MouseUp($MOUSE_CLICK_RIGHT)
Sleep(600)
$stick = $stick + 1
EndIf
Send("i")
Sleep(2000)
EndIf
$aCoord = PixelSearch(907, 310, 921, 324, 0xE7FFFF, 30, 1)
If not @error Then
Sleep(1000+Random(0, 80, 1))
Send("{SPACE}")
Sleep(1000+Random(0, 80, 1))
EndIf
$aCoord = PixelSearch(817, 230, 833, 242, 0xB6B6B6, 30, 1)
If not @error Then
Sleep(1000+Random(0, 80, 1))
Send("r")
Sleep(1000+Random(0, 80, 1))
Send("{SPACE} ")
Sleep(6000+Random(0, 80, 1))
EndIf
Sleep(10)
WEnd
;;;;;;;;
Func IsPressed($hexKey)
Local $aR, $bO
$hexKey = '0x' & $hexKey
$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
$bO = 1
Else
$bO = 0
EndIf
Return $bO
EndFunc ;==>_IsPressed
Func TogglePause()
$Paused = NOT $Paused
While $Paused
WEnd
EndFunc
AUTOPERFECT.AU3
Code:
#RequireAdmin
; Press Esc to terminate script, Pause/Break to "pause"
#include <AutoItConstants.au3>
HotKeySet("{PAUSE}", "TogglePause")
$dll = DllOpen("user32.dll")
Opt("SendKeyDownDelay", 10)
$color = 0
$gap = 42
$counter = 1
$xf = 0
$yf = 0
$xn = 0
$xb = 0
$yb = 0
$yn = 0
$str = ""
$mul = 0
$ska = 0
$perfect = 875
;~ $perfect УВЕЛИЧИВАТЬ ЕСЛИ ВЫТЯГИВАЕТ РЫБУ ДО ПЕРФЕКТА, ЕСЛЯ ТЯНЕТ ПОЗДНО УМЕНЬШАТЬ
;~ ИНСТРУКЦИЯ
Local $aCoord[2]=["0", "0"]
AutoItSetOption("CaretCoordMode", 1)
AutoItSetOption("MouseCoordMode", 1)
AutoItSetOption("PixelCoordMode", 1)
;;;; Body of program would go here;;;;
While 1
Opt("SendKeyDownDelay", 1)
$aCoord = PixelSearch($perfect, 406, $perfect+14, 424, 0x477FA1, 13, 1)
If not @error Then
Send("{SPACE}")
Sleep(2400)
Send("r")
EndIf
WEnd
;;;;;;;;
Func IsPressed($hexKey)
Local $aR, $bO
$hexKey = '0x' & $hexKey
$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
$bO = 1
Else
$bO = 0
EndIf
Return $bO
EndFunc ;==>_IsPressed
Func TogglePause()
$Paused = NOT $Paused
While $Paused
WEnd
EndFunc
ANTICAPTCHA.AU3
Code:
#RequireAdmin
#AutoIt3Wrapper_UseX64=n ; Set to Y or N depending on your situation/preference!!
#include-once
#include <WinAPIFiles.au3> ; for _WinAPI_Wow64EnableWow64FsRedirection
#include <ScreenCapture.au3> ;_ScreenCapture_CaptureWnd etc. ;using this in the example to create a test image, otherwise not neccessary here
$dll = DllOpen("user32.dll")
$color = 0
$gap = 42
$counter = 1
$xf = 0
$yf = 0
$xn = 0
$xb = 0
$Res = 0
$yb = 0
$yn = 0
$xl = 0
$yl = 0
$str = ""
$mul = 0
$ska = 0
Local $aCoord[2]=["0", "0"]
Opt("SendKeyDownDelay", 105)
AutoItSetOption("CaretCoordMode", 1)
AutoItSetOption("MouseCoordMode", 1)
AutoItSetOption("PixelCoordMode", 1)
#Region When running compiled script, Install needed DLLs if they don't exist yet
If Not FileExists("ImageSearchDLLx32.dll") Then FileInstall("ImageSearchDLLx32.dll", "ImageSearchDLLx32.dll", 1);FileInstall ( "source", "dest" [, flag = 0] )
If Not FileExists("ImageSearchDLLx64.dll") Then FileInstall("ImageSearchDLLx64.dll", "ImageSearchDLLx64.dll", 1)
If Not FileExists("msvcr110d.dll") Then FileInstall("msvcr110d.dll", "msvcr110d.dll", 1);Microsoft Visual C++ Redistributable dll x64
If Not FileExists("msvcr110.dll") Then FileInstall("msvcr110.dll", "msvcr110.dll", 1);Microsoft Visual C++ Redistributable dll x32
#EndRegion
Local $h_ImageSearchDLL = -1; Will become Handle returned by DllOpen() that will be referenced in the _ImageSearchRegion() function
#Region TESTING/Example
Local $bTesting = true; Change to TRUE to turn on testing/example
If $bTesting Then
_ImageSearchStartup()
OnAutoItExitRegister(_ImageSearchShutdown)
While 1
$gap = 35
$counter = 0
$xf = 0
$yf = 0
$xn = 0
$yn = 0
$ska = 0
if($mul>=9)then
$xl = 0
$yl = 0
$mul = 0
$Res = 0
$str = ""
Send($str)
EndIf
If ($xl == 0) Then
$Res = _ImageSearchArea("checker.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker3.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker2.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker4.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
If ($xl > 0) Then
Sleep(800)
$Res = _ImageSearchArea("checker.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker4.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker3.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
$Res = _ImageSearchArea("checker2.bmp", 0, 630, 412, 713, 467, $xl, $yl, 60)
EndIf
EndIf
If($Res == 0)Then
$str = ""
$xl = 0
$yl = 0
EndIf
If ($xl > 0) Then
$file = FileOpen("coords.txt", 1)
FileWriteLine($file, $xl&" "&$yl)
$color = PixelGetColor($xl-24, $yl-36)
$xb = $xl-24
$yb = $yl-36
;~ TrayTip("color", "0x" & Hex($color,6), 7000)
$xf = $xb-10+($gap*$mul)
$yf = $yb-10
$xn = $xf
$oc = 0
$yn = $yf
While (($xn < $xf+24)And($yn < $yf+19))
$color1 = PixelGetColor($xn, $yn)
If($color1 == $color) Then
$counter = $counter+1
EndIf
If($xn >= $xf+23) Then
$yn = $yn+1
$xn = $xf
If(($oc < $counter)And($counter>1)) Then
ExitLoop
EndIf
$oc = $counter
EndIf
$xn = $xn+1
WEnd
If ($counter >= 5) Then
$ska = 1
$str = $str&"s"
Sleep(10)
EndIf
$var1 = 24
$oc = $counter
$counter2=$counter
$oc = $counter2
While(($xn < $xf+$var1)And($yn < $yf+19))
$color1 = PixelGetColor($xf+$var1, $yn)
If($color1 == $color) Then
$counter2 = $counter2+1
EndIf
If($yn >= $yf+18) Then
$var1 = $var1-1
$yn = $yf
FileWriteLine($file, $counter2&" - A")
If(($oc < $counter2)And($counter2>1)) Then
If (($counter2 >= 8)And($ska == 0)) Then
$str = $str&"a"
Sleep(10)
$counter = 999
EndIf
ExitLoop
EndIf
$oc = $counter2
EndIf
$yn = $yn+1
WEnd
$oc = $counter
$counter3 = $counter
While(($xn < $xf+23)And($yn < $yf+19))
$color1 = PixelGetColor($xn, $yn)
If($color1 == $color) Then
$counter = $counter+1
EndIf
If($yn >= $yf+18) Then
$xn = $xn+1
$yn = $yf
If(($oc < $counter)And($counter>1)) Then
ExitLoop
EndIf
$oc = $counter
EndIf
$yn = $yn+1
WEnd
If ($counter-$counter3 >= 5) Then
if ($ska == 0) Then
$str = $str&"d"
Sleep(10)
$counter = 999
EndIf
EndIf
$var1 = 24
$oc = $counter
While(($xn < $xf+$var1)And($yn < $yf+19))
If($counter >= 999) Then
ExitLoop
EndIf
$color1 = PixelGetColor($xf+$var1, $yn)
If($color1 == $color) Then
$counter = $counter+1
EndIf
If($yn >= $yf+18) Then
$var1 = $var1-1
$yn = $yf
If(($oc < $counter)And($counter>1)) Then
ExitLoop
EndIf
$oc = $counter
EndIf
$yn = $yn+1
WEnd
If ($counter > 0) Then
If (($counter <= 10)And($ska == 0)) Then
$str = $str&"w"
Sleep(10)
EndIf
FileWriteLine($file, $counter&" - COUNT ALL")
EndIf
$mul = $mul+1
if ($counter < 4) Then
FileWriteLine($file, $str&" - TYPE")
Send($str)
$str = ""
$mul = 0
$xl = 0
$yl = 0
Sleep(200)
EndIf
FileClose($file)
EndIf
Sleep(10)
WEnd
EndIf
Exit
#EndRegion TESTING/Example
#Region ImageSearch Startup/Shutdown
Func _ImageSearchStartup()
_WinAPI_Wow64EnableWow64FsRedirection(True)
$sOSArch = [MENTION=5283864]Osar[/MENTION]ch ;Check if running on x64 or x32 Windows [MENTION=5283864]Osar[/MENTION]ch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system.
$sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt.
If $sOSArch = "X86" Or $sAutoItX64 = 0 Then
cr("+>" & [MENTION=5283864]Osar[/MENTION]ch=" & $sOSArch & [MENTION=546457]tab[/MENTION] & "@AutoItX64=" & $sAutoItX64 & [MENTION=546457]tab[/MENTION] & "therefore using x32 ImageSearch DLL")
$h_ImageSearchDLL = DllOpen("ImageSearchDLLx32.dll")
If $h_ImageSearchDLL = -1 Then Return "DllOpen failure"
ElseIf $sOSArch = "X64" And $sAutoItX64 = 1 Then
cr("+>" & [MENTION=5283864]Osar[/MENTION]ch=" & $sOSArch & [MENTION=546457]tab[/MENTION] & "@AutoItX64=" & $sAutoItX64 & [MENTION=546457]tab[/MENTION] & "therefore using x64 ImageSearch DLL")
$h_ImageSearchDLL = DllOpen("ImageSearchDLLx64.dll")
If $h_ImageSearchDLL = -1 Then Return "DllOpen failure"
Else
Return "Inconsistent or incompatible Script/Windows/CPU Architecture"
EndIf
Return True
EndFunc ;==>_ImageSearchStartup
Func _ImageSearchShutdown()
DllClose($h_ImageSearchDLL)
_WinAPI_Wow64EnableWow64FsRedirection(False)
cr(">" & "_ImageSearchShutdown() completed")
Return True
EndFunc ;==>_ImageSearchShutdown
#EndRegion ImageSearch Startup/Shutdown
#Region ImageSearch UDF;slightly modified
; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.0
; Language: English
; Description: Functions that assist with Image Search
; Require that the ImageSearchDLL.dll be loadable
;
; ------------------------------------------------------------------------------
;===============================================================================
;
; Description: Find the position of an image on the desktop
; Syntax: _ImageSearchArea, _ImageSearch
; Parameter(s):
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
; $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
; the color to be used as transparency; can be omitted if
; not needed
;
; Return Value(s): On Success - Returns True
; On Failure - Returns False
;
; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify
; a desktop region to search
;
;===============================================================================
Func _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
Return _ImageSearchArea($findImage, $resultPosition, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, $tolerance, $transparency)
EndFunc ;==>_ImageSearch
Func _ImageSearchArea($findImage, $resultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance = 0, $transparency = 0);Credits to Sven for the Transparency addition
If Not FileExists($findImage) Then Return "Image File not found"
If $tolerance < 0 Or $tolerance > 255 Then $tolerance = 0
If $h_ImageSearchDLL = -1 Then _ImageSearchStartup()
If $transparency <> 0 Then $findImage = "*" & $transparency & " " & $findImage
If $tolerance > 0 Then $findImage = "*" & $tolerance & " " & $findImage
$result = DllCall($h_ImageSearchDLL, "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findImage)
If @error Then Return "DllCall Error=" & @error
If $result = "0" Or Not IsArray($result) Or $result[0] = "0" Then Return False
$array = StringSplit($result[0], "|")
If (UBound($array) >= 4) Then
$x = Int(Number($array[2])); Get the x,y location of the match
$y = Int(Number($array[3]))
If $resultPosition = 1 Then
$x = $x + Int(Number($array[4]) / 2); Account for the size of the image to compute the centre of search
$y = $y + Int(Number($array[5]) / 2)
EndIf
Return True
EndIf
EndFunc ;==>_ImageSearchArea
;===============================================================================
;
; Description: Wait for a specified number of seconds for an image to appear
;
; Syntax: _WaitForImageSearch, _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
; $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
; the color to be used as transparency can be omitted if
; not needed
;
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImageSearch($findImage, $waitSecs, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
$waitSecs = $waitSecs * 1000
$startTime = TimerInit()
While TimerDiff($startTime) < $waitSecs
Sleep(100)
If _ImageSearch($findImage, $resultPosition, $x, $y, $tolerance, $transparency) Then
Return True
EndIf
WEnd
Return False
EndFunc ;==>_WaitForImageSearch
;===============================================================================
;
; Description: Wait for a specified number of seconds for any of a set of
; images to appear
;
; Syntax: _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the ARRAY of images to locate on the desktop
; - ARRAY[0] is set to the number of images to loop through
; ARRAY[1] is the first image
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
; $transparent - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
; the color to be used as transparent; can be omitted if
; not needed
;
; Return Value(s): On Success - Returns the index of the successful find
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImagesSearch($findImage, $waitSecs, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
$waitSecs = $waitSecs * 1000
$startTime = TimerInit()
While TimerDiff($startTime) < $waitSecs
For $i = 1 To $findImage[0]
Sleep(100)
If _ImageSearch($findImage[$i], $resultPosition, $x, $y, $tolerance, $transparency) Then
Return $i
EndIf
Next
WEnd
Return False
EndFunc ;==>_WaitForImagesSearch
#EndRegion ImageSearch UDF;slightly modified
#Region My Custom ConsoleWrite/debug Function
Func cr($text = "", $addCR = 1, $printTime = False) ;Print to console
Static $sToolTip
If Not @Compiled Then
If $printTime Then ConsoleWrite(@HOUR & ":" & [MENTION=287308]Min[/MENTION] & ":" & [MENTION=301518]sec[/MENTION] & ":" & [MENTION=912041]mse[/MENTION]C & " ")
ConsoleWrite($text)
If $addCR >= 1 Then ConsoleWrite(@CR)
If $addCR = 2 Then ConsoleWrite(@CR)
Else
If $printTime Then $sToolTip &= @HOUR & ":" & [MENTION=287308]Min[/MENTION] & ":" & [MENTION=301518]sec[/MENTION] & ":" & [MENTION=912041]mse[/MENTION]C & " "
$sToolTip &= $text
If $addCR >= 1 Then $sToolTip &= @CR
If $addCR = 2 Then $sToolTip &= @CR
ToolTip($sToolTip)
EndIf
Return $text
EndFunc ;==>cr
#EndRegion My Custom ConsoleWrite/debug Function

Leave a Thanks, dont just download and run. Thats not cool.






