Sign in to follow this  
Followers 0
dmbech

Stumped On Pixelgetcolor...

6 posts in this topic

Working on a script for a game. Using the PixelGetColor command quite a bit. My problem appears to be that on certain parts of the display this works fine. Other parts of the display it seems to always return the same color even if the pixel color actually changes! I thought I read something in these forums about this very issue but can't seem to dig it up. Any ideas? I even tried a PixelChecksum of the small area around the pixel I want to track and that returned the same value either way too! Stumped...

Share this post


Link to post
Share on other sites



What color is it displaying? Some games either use overlaying methods that make pixelgetcolor not work, or block the getcolor api that AutoIt uses as a protection against hacking the game.

What game is it?


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

What color is it displaying? Some games either use overlaying methods that make pixelgetcolor not work, or block the getcolor api that AutoIt uses as a protection against hacking the game.

What game is it?

World Of Warcraft. Funny part is it works for somethings like status bars but not other things. For instance, I am trying to track pet's contentment. There is a little icon that changes from green to yellow to red. However, pixelgetcolor always returns the same color no matter what. R=95, G=83 B=22. There is some variation in there, but it doesn't track with the actual color changes.

Share this post


Link to post
Share on other sites

I know this probably sounds obvious, but have you checked your PixelCoordMode to make sure you are checking in the correct spot? Also, check the CoordMode on the AutoIt Window Info options to make sure the coordinates match up with your AutoItSetOption("PixelCoordMode")

Share this post


Link to post
Share on other sites

I know this probably sounds obvious, but have you checked your PixelCoordMode to make sure you are checking in the correct spot? Also, check the CoordMode on the AutoIt Window Info options to make sure the coordinates match up with your AutoItSetOption("PixelCoordMode")

Thanks for the sanity check. I have Opt("PixelCoordMode", 0) set in the script and using Coord Mode Window in the Info tool. So pixels should be lining up.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Figured it out...duh...in a previous function I was displaying a message box for some debugging. Then immediately after calling the function to check the pet status. Well, when the MsgBox was displayed the WoW window was no longer the active window. I added a WinActivate command before checking for the pixel color and viola, all is fine now!

Edited by dmbech

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