langthang084 Posted March 27, 2009 Share Posted March 27, 2009 how to check a rectangle of pixels for pixel color (dont depend on levels of color). Example if the color is blue --> it's correct Link to comment Share on other sites More sharing options...
TerarinK Posted March 27, 2009 Share Posted March 27, 2009 Look under PixelSearch in the help file 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
langthang084 Posted March 27, 2009 Author Share Posted March 27, 2009 Can U give me an example about it???, i'm newbie and i dont understand it clearly Link to comment Share on other sites More sharing options...
E1M1 Posted March 28, 2009 Share Posted March 28, 2009 I made it quickly, you can also paste your source here or game/program name. I hope this help u abit. ;Search blue pixel from left upper corner of scren $var = PixelSearch ( 0, 0, 1, 1, 0x0000ff ) If Not $var = 1 Then ;if blue pixel found OK MsgBox(0,"","Found") EndIf edited Link to comment Share on other sites More sharing options...
langthang084 Posted March 28, 2009 Author Share Posted March 28, 2009 (edited) This is my pic: I want to check the color at "KLH84" position, but this pic can see through the blue background, so i dont know to define the color pixel Edited March 28, 2009 by langthang084 Link to comment Share on other sites More sharing options...
TerarinK Posted March 28, 2009 Share Posted March 28, 2009 edit a box around the KLH84 if the search find the color white then you have got the text 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
langthang084 Posted March 28, 2009 Author Share Posted March 28, 2009 the position I want to check isnt alway KLH84, it can be unforeseeable. So I think should check the blue background. Link to comment Share on other sites More sharing options...
TerarinK Posted March 28, 2009 Share Posted March 28, 2009 Check the whole screen, as long as you choose a color that is only in the wording your fine. 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
langthang084 Posted May 6, 2009 Author Share Posted May 6, 2009 (edited) I use this code to check a white character on the line at KLH84 position: if PixelSearch(90,148,90,148,0xffffff) <> @error Then msgbox(0,"","CORRECT") endif but however KHL84 appears or not, the msgbox always show Edited May 6, 2009 by langthang084 Link to comment Share on other sites More sharing options...
BrettF Posted May 6, 2009 Share Posted May 6, 2009 Your logic is wrong. $coords = PixelSearch (...) If Not @error Then ;Correct; Else ;Incorrect EndIf Christ even the helpfile has and example of what you want! READ IT! 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...
langthang084 Posted May 6, 2009 Author Share Posted May 6, 2009 No, I thinks if @error then nothing appear. But error or not, the msgbox CORRECT always show In this pic I check the red line and its alway show INCORRECT 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