lucasdnd Posted August 16, 2007 Share Posted August 16, 2007 (edited) Hi all! I've been using PixelSearch to do some suff here... and I realized it searches pixels from the top to the bottom of the screen. "The search is performed left-to-right, top-to-bottom and the first match is returned." - Help File on PixelSearch I wonder if there is any way to change it, and start the search from the bottom. I looked for it here in the forums and in the help file, but didn't find anything... Thanks for the help Edited August 16, 2007 by lucasdnd Link to comment Share on other sites More sharing options...
bluebearr Posted August 16, 2007 Share Posted August 16, 2007 (edited) I haven't tested this, but would something like this work?OK, I couldn't help it, I tested it, and made some changes. Seems to work.$aPix = _PixelSearchRev(0, 0, @DesktopWidth, @DesktopHeight, 0xFFFFFF) If Not @error Then MsgBox(0, "Return", $aPix[0] & ", " & $aPix[1]) EndIf Func _PixelSearchRev ( $left, $top, $right, $bottom, $color, $shadeVar = 0, $step = 1 ) Local $i, $j, $aRet For $i = $bottom To $top Step -1 For $j = $right to $left Step -$step $aRet = PixelSearch( $j, $i, $j, $i, $color, $shadeVar ) If Not @error Then Return $aRet EndIf Next Next SetError(1) EndFunc Edited August 16, 2007 by bluebearr BlueBearrOddly enough, this is what I do for fun. Link to comment Share on other sites More sharing options...
lucasdnd Posted August 16, 2007 Author Share Posted August 16, 2007 (edited) I hadn't thought I could do that lol. Thanks a lot bluebearr. I'll test it later =) Edited August 16, 2007 by lucasdnd Link to comment Share on other sites More sharing options...
herewasplato Posted August 16, 2007 Share Posted August 16, 2007 ...OK, I couldn't help it, I tested it, and made some changes...:-)Spoken like a true AutoIt addict.:-)Thanks for all of the help that you give to the forum... keep up the good work.-MSP- [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
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