Phenax Posted April 13, 2009 Posted April 13, 2009 Hello, basically.. I want PixelSearch to continue where it left off after it got it's first match so I can continue to find more matches. Is this possible? If so, how?
PsaltyDS Posted April 14, 2009 Posted April 14, 2009 Hello, basically.. I want PixelSearch to continue where it left off after it got it's first match so I can continue to find more matches. Is this possible? If so, how?PixelSearch() returns X/Y coordinates. Do the math on the remaining portion of the rectangle and finish the search. You could also search one vertical or horizontal line at a time in a For/Next loop, and then just ContinueLoop. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
WideBoyDixon Posted April 14, 2009 Posted April 14, 2009 Just taking a quick stab at this since I have nothing better to do Func _PixelSearchContinue($left, $top, $right, $bottom, $color, $x = -1, $y = -1, $shadevar = -1, $step = -1, $hwnd = -1) Local $ret If $y = -1 Then $y = $top If $x = -1 Then $x = $left Else $x += 1 If $x > $right Then $x = $left $y += 1 If $y > $bottom Then Return SetError(1, 0, 0) EndIf EndIf If $x = $left Then $ret = PixelSearch($x, $y, $right, $bottom, $color, $shadevar, $step, $hwnd) If @error = 1 Then Return SetError(1, 0, 0) Return SetError(0, 0, $ret) Else $ret = PixelSearch($x, $y, $right, $y, $color, $shadevar, $step, $hwnd) If @error <> 1 Then Return SetError(0, 0, $ret) $y += 1 If $y > $bottom Then Return SetError(1, 0, 0) $x = $left $ret = PixelSearch($x, $y, $right, $bottom, $color, $shadevar, $step, $hwnd) If @error = 1 Then Return SetError(1, 0, 0) Return SetError(0, 0, $ret) EndIf EndFuncoÝ÷ ÙKç±jjey«¢+Ù±½°ÀÌØí±ÍÑàô´Ä°ÀÌØí±ÍÑäô´Ä°ÀÌØíÁÍ()]¡¥±QÉÕ($ÀÌØíÁÍô}A¥á±MÉ¡ ½¹Ñ¥¹Õ À°À°ÄÈà°ÄÈà°À°ÀÌØí±ÍÑà°ÀÌØí±ÍÑä¤(%%ÉɽÈôÄQ¡¸á¥Ñ1½½À(% ½¹Í½±]É¥Ñ ÅÕ½Ðì ÅÕ½ÐìµÀìÀÌØíÁÍlÁtµÀìÅÕ½Ðì°ÅÕ½ÐìµÀìÀÌØíÁÍlÅtµÀìÅÕ½Ðì¤ÅÕ½ÐìµÀì I1¤($ÀÌØí±ÍÑàôÀÌØíÁÍlÁt($ÀÌØí±ÍÑäôÀÌØíÁÍlÅt)]¹ If it's not right then it's not far away ... WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
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