KurogamineNox Posted June 12, 2010 Share Posted June 12, 2010 What's the difference between PixelSearch() and PixelGetColor()? Link to comment Share on other sites More sharing options...
Yoriz Posted June 12, 2010 Share Posted June 12, 2010 Did you look at those functions in the helpfile? One returns where it find a certain colour in a given region, the other returns what colour is at a certain position. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
wolf9228 Posted June 12, 2010 Share Posted June 12, 2010 (edited) ;PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] ) ;Without used Window handle ;Search color IN Screen Form Screen left------TO ----Screen right From Screen_top From Screen_top - - - looking color inside this box - - TO TO - - - - Screen_bottom Screen_bottom Form Screen left------TO ----Screen right $color = 0xFF0000 $Screen_left = 100 $Screen_top = 100 $Screen_right = 200 $Screen_bottom = 200 $coord = PixelSearch( $Screen_left,$Screen_top,$Screen_right,$Screen_bottom,$color) if @error Then MsgBox(0,"MSG","color is not found") Else MsgBox(0,"MSG","color is found inside this box In Screen_left " _ & $coord[0] & " " & @CRLF & "And inside this box In Screen_top " & $coord[1]) EndIf ;Get color From Screen ;Get color From Screen $Screen_left = 100 $Screen_top = 100 $color = PixelGetColor($Screen_left,$Screen_top) MsgBox(0,"The decimal color is", $color) MsgBox(0,"The hex color is", Hex($color, 6)) Edited June 12, 2010 by wolf9228 صرح السماء كان هنا Link to comment Share on other sites More sharing options...
KurogamineNox Posted June 12, 2010 Author Share Posted June 12, 2010 ;PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] ) ;Without used Window handle ;Search color IN Screen Form Screen left------TO ----Screen right From Screen_top From Screen_top - - - looking color inside this box - - TO TO - - - - Screen_bottom Screen_bottom Form Screen left------TO ----Screen right $color = 0xFF0000 $Screen_left = 100 $Screen_top = 100 $Screen_right = 200 $Screen_bottom = 200 $coord = PixelSearch( $Screen_left,$Screen_top,$Screen_right,$Screen_bottom,$color) if @error Then MsgBox(0,"MSG","color is not found") Else MsgBox(0,"MSG","color is found inside this box In Screen_left " _ & $coord[0] & " " & @CRLF & "And inside this box In Screen_top " & $coord[1]) EndIf ;Get color From Screen ;Get color From Screen $Screen_left = 100 $Screen_top = 100 $color = PixelGetColor($Screen_left,$Screen_top) MsgBox(0,"The decimal color is", $color) MsgBox(0,"The hex color is", Hex($color, 6)) Ty alot, it worked mighty well. 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