identify windows in front of another one

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
spazpunt
Newbie
Posts: 3
Joined: Thu Jul 16, 2009 8:47 am

identify windows in front of another one

Post by spazpunt » Thu Jul 16, 2009 8:55 am

Is there any way to make macro scheduler know which window/s(e.g.windows A and B) is in front of a previously inactive window (windows C)which has just been made active and consequenly minimising those windows(A,B) and then make windows c active?

Can anyone post a script with its explanation in it?
Thanks

spazpunt
Newbie
Posts: 3
Joined: Thu Jul 16, 2009 8:47 am

Post by spazpunt » Fri Jul 17, 2009 10:36 am

can it be done or is it too complicated?plz at least tell me something!!! :( :( :( :( :(

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Jul 17, 2009 1:34 pm

Can you provide a little more detail?
What are you really trying to accomplish?
Do you know the names of these windows or are you speaking of windows in general?
Are you using Macro Scheduler to open these windows or are they already open?

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

GetWindowList might work.

Post by gdyvig » Fri Jul 17, 2009 2:29 pm

Hi spazpunt,

GetWindowList might tell you what you want to know. The user manual does not document the sort order of the windows, but it appears the currently active window is listed first, followed by the 2nd most recently active window, and so on. If the windows are overlapping, the first window would be on top, the 2nd window under the first, and so on.

You should do some experiments to see if this is always true. For example, click on the various windows to change their positions and then do a GetWindowList to see if the sort order still behaves as I described.


GetActiveWindow will tell you which window is on top, but will not tell you anything about the windows below it.


Gale

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