Re: Why am I doing wrong?
Put your debugging skills to work. What is PixelColor when you call GetPixel? What do you expect it to be?
Re: Why am I doing wrong?
Quote:
Originally Posted by
Negative0
Put your debugging skills to work. What is PixelColor when you call GetPixel? What do you expect it to be?
Should X/Y be integer?
Re: What am I doing wrong?
Yes X and Y should be integers and your GetPixel declaration should have them as integers.
Re: What am I doing wrong?
Quote:
Originally Posted by
Negative0
Yes X and Y should be integers and your GetPixel declaration should have them as integers.
I changed it to integer, and it still doesnt work.
Re: What am I doing wrong?
I'll ask again: What is PixelColor when you call GetPixel? What do you expect it to be?
Re: What am I doing wrong?
Quote:
Originally Posted by
Negative0
I'll ask again: What is PixelColor when you call GetPixel? What do you expect it to be?
I expect GetPixel to find a color in the window.
Re: What am I doing wrong?
Get pixel simply returns the color at a given pixel. You should be able to test that it is working by giving pixel coordinates where you know what the color is and check that GetPixel is returning the value you expect.
Re: What am I doing wrong?
Quote:
Originally Posted by
werido
Code:
On Error Resume Next
Bad!! bad, bad, bad, bad!!!!!!!!!!!!