v1rtu0s1ty Posted July 22, 2005 Posted July 22, 2005 Hey guys, I saw this code on another thread. I want to make a new thread so it's cleaner. expandcollapse popup;---------------------------------------------------------------- ;;;;;The very first pixel should be as unique as possible... ;---------------------------------------------------------------- $info = _ImageSearchGetInfo(326,313,339,331) $xy = _ImageSearch(0,0,640,480,$info) If Not @error Then MsgBox(4096,"",$xy[0] & "," & $xy[1]) Func _ImageSearchGetInfo($l,$t,$r,$b) Dim $array[4] $color = PixelGetColor($l, $t) $chksum = PixelChecksum($l, $t, $r, $b) $array[0] = $r - $l $array[1] = $b - $t $array[2] = $color $array[3] = $chksum Return $array EndFunc Func _ImageSearch($left,$top,$width,$height,$ISarray) $x = $left $y = $top $boundX = $left + $width $boundY = (($top + $height) - $ISarray[1]) While $x <= $boundX And $y <= $boundY $initXY = PixelSearch($x, $y, $boundX, $y, $ISarray[2]) If Not @error Then If $ISarray[3] = PixelChecksum($initXY[0], $initXY[1], $initXY[0] + $ISarray[0], $initXY[1] + $ISarray[1]) Then Return $initXY Else If ($initXY[0] + $ISarray[0]) > $boundX Then $y = $y + 1 Else $x = $initXY[0] + 1 EndIf EndIf Else $y = $y + 1 EndIf WEnd SetError(1) EndFunc Can someone please tell me how I can use this function to capture a msgbox? Or, I saw another thread but couldn't recall where. There was a function wherein we can specify a coordinate and capture the text sitting on the msgbox(no controls or classname on text). Then once we have that text captured, it can be compared against a font, something like this......Can someone please show me how? Thanks, Neil
MSLx Fanboy Posted July 22, 2005 Posted July 22, 2005 Lazycat made a dll once...Capt_Screen_DLL.zip Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
v1rtu0s1ty Posted July 23, 2005 Author Posted July 23, 2005 (edited) Lazycat made a dll once...<{POST_SNAPBACK}>Ok, I do see some examples Can it capture the active child dialog window?Thanks,Neil Edited July 23, 2005 by v1rtu0s1ty
MSLx Fanboy Posted July 23, 2005 Posted July 23, 2005 $aCoordinates = WinGetPos() Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
v1rtu0s1ty Posted July 23, 2005 Author Posted July 23, 2005 $aCoordinates = WinGetPos()<{POST_SNAPBACK}>Correct me if am wrong, that function will retrieve the current active windows coordinate and pass it to $aCoordinates. If so, is $aCoordinates an array?Thanks,
MSLx Fanboy Posted July 23, 2005 Posted July 23, 2005 Yep, the exacts are in the help file Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
v1rtu0s1ty Posted July 25, 2005 Author Posted July 25, 2005 Yep, the exacts are in the help file <{POST_SNAPBACK}>Hi, can it capture image and save it as a .gif file? GIF files are better when it comes to plain dialogue boxes.Thanks,Neil
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now