Problem with GetPixelColor

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Problem with GetPixelColor

Post by Mayhem » Tue Apr 29, 2003 5:35 am

I'm having a problem with GetPixelColor ...

I have a program that waits for a Pixelcolor at X,Y coord's.
If color exists, it continues the macro
If color doesn't exist, it waits ...

It all works fine IF i first

a) SetFocus>Window title
b) MoveWindow>Window Title,0,0

How can i make it look for a PixelColor relevant to a window?
So the window doesn't have to be moved to 0,0 first.

Is there any GetPixelColorRel command or similar?

Thanks,

Ken Jensen
Mobile Computer Services

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Apr 29, 2003 8:35 am

Hi,

You can easily calculate the relative position by using GetActiveWindow to return the X,Y pos of the window itself. Now you can add the relative position to these to get the absolute screen position.
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts