Sign in to follow this  
Followers 0
Guest Dygeric

Color Identification Script!

3 posts in this topic

Hello all,

I am trying to make a script so that if a certain color is detected on the screen, It shuts off a process, sure sure it works, when the color is SUPER OBVIOUS like WHITE, or BLUE, I am trying to be as specific as I can, but it doesnt work. Me and friends play this game call Dark Ages, It literally looks like a Gameboy Advanced Game, but there is a political system in the game and if you "sleephunt" (level your skills IF your not at your PC) is illegal. And if a RANGER finds you (Players appointed by the GM's) you get a nasty arrest mark that prevents you from doing certain things in the game. Now, rangers wear this shiny gold armor before they start the arrest process, I want the script to find the color of the armor and close the process darkages.exe, I got it to work but aparently its not very good at finding specific colors. Heres the code I've wrote so far.

$coord = PixelSearch( 0,0, @desktopwidth, @desktopheight, 0x0884EF, 0, 50 )
If not @error Then
    ProcessClose("darkages.exe")
EndIf

The color code is green in this case and it resembles green from this screen shot (its in the attatchments "Green.bmp") The grass in there is what I am trying to TEST for now.

The ranger armor looks like in the attatchment RangerTabard.gif.

When I change the color to white, and I open notepad for example, it automatically detects the White in notepad and closes Darkages.exe (thats the process's name). But when I try the grass or pretty much ANY color in that screen shot it wont do what its suppose to!

Please help.

Share this post


Link to post
Share on other sites



From the Auto IT Window info!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0