joeyone Posted February 5, 2008 Share Posted February 5, 2008 (edited) I want to use getpixelcolor() to find a range of colors in the same tone is RGB the easyiest format to do this? for example find colors between these ranges with pixelgetcolor R 230 - 240 G 120 - 130 B 165 - 160 is there a easy way to do this? thanks in advance Edited February 5, 2008 by joeyone Link to comment Share on other sites More sharing options...
BrettF Posted February 5, 2008 Share Posted February 5, 2008 Maybe... Dim $arr[3] = [10, 10, 5] Dim $aR[3] = [230, 00, 00] Dim $aB[3] = [00, 120, 00] Dim $aG[3] = [00, 00, 160] For $i = 0 to 2 $var = $arr[$i] $r = $aR[$i] $b = $aB[$i] $g = $aG[$i] $hex = "0x" & Hex ($r & $b & $g, 6) PixelSearch (0, 0, 100, 100, $hex, $var) ConsoleWrite ("- Hex Value " & ($i + 1) & " = " & $hex & " ERROR = " & @error & @CRLF ) Next Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted February 5, 2008 Share Posted February 5, 2008 Sorry. Didn't Read A simple If statement: $ret = 15;PixelGetColor (x, y) Select Case ($ret > 10 AND $ret < 20) MsgBox (0, "", "") EndSelect Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
joeyone Posted February 5, 2008 Author Share Posted February 5, 2008 (edited) Sorry. Didn't ReadA simple If statement:$ret = 15;PixelGetColor (x, y)Select Case ($ret > 10 AND $ret < 20) MsgBox (0, "", "")EndSelectimagine we have a color that is blue and somtimes this color changes to slightly darker blue or lighter blue even if it changes we need to identify the color as "blue"if we then need to identify more colors who can possibly be at the same pixel for example red, green and purple do i need to change alot in the script you attached to make this possible? Edited February 5, 2008 by joeyone 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