Get Window Position

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Get Window Position

Post by delta1 » Sat Jan 02, 2010 5:12 pm

When I use this command the x,y variables in the top left corner are -4,-4. MS and Text Capture Script indicate 0,0 on the same screen. Where is the 4 coming from and why is it negative?
Thanks.

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Maximized window has hidden border.

Post by gdyvig » Sat Jan 02, 2010 5:43 pm

Hi Delta1,

Most likely the reason is because the window is maximized. The border around the window is "painted" outside the display area to make the window resize and move functionality unavailable. These negative coordinates are also seen with other tools besides Macro Scheduler.


Gale

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Sat Jan 02, 2010 8:22 pm

Thanks Gale, I'm computing absolute resolution from child co-ordinates so I think I should set the position variables of the main window to zero if a negative value is detected.
Rob

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