Jump to content
Sign in to follow this  
grlscz

PixelGetColor(x,y) always returns 0

Recommended Posts

grlscz

Hi!

I'm trying to write a bot for a game using AutoIt. For that I need to know colors of pixels on screen. However, when I try to use PixelGetColor on the game's window, it always returns 0.

Also Au3Info shows only 0 for the colors on the game's window.

On the other hand, screen capturing programs can grab the contents of the window normally.

Is there a way to make PixelGetColor work?

thx

Edited by grlscz

Share this post


Link to post
Share on other sites
SmOke_N

Is the game protetected by anything (gameguard/ntprotect)? (For a non-gamer I sure do know what those are :P ... I spend way too much time on here!!) If they are, you'll need to figure a hack for them before you'll be able to use anything in AutoIt to automate your play.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
grlscz

It is protected, but AutoIt do work. I made some "blind" scripts, and they work. But now I want to read the screen.

Share this post


Link to post
Share on other sites
SmOke_N

It is protected, but AutoIt do work. I made some "blind" scripts, and they work. But now I want to read the screen.

No, autoit "do" not work with pixel options if it is protected :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
grlscz

You wrote "before you'll be able to use anything in AutoIt" - therefore my reply.

OK.

So you saying, that there is no way to make PixelGetColor work until gameguard be disabled somehow, did I understand you right?

Edited by grlscz

Share this post


Link to post
Share on other sites
SmOke_N

You wrote "before you'll be able to use anything in AutoIt" - therefore my reply.

OK.

So you saying, that there is no way to make PixelGetColor work until gameguard be disabled somehow, did I understand you right?

Yes

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.