GetActiveWindow>Window_Title,X,Y,Width,Height

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

GetActiveWindow>Window_Title,X,Y,Width,Height

Post by armsys » Mon Sep 01, 2003 1:05 am

If there's no more windows running, what would GetActiveWindow return? What value would be stored in Window_Title? Is it an ASCII value 0 or 255 or something else? What numeric values will be stored in X, Y, Width, and Height?

Thanks for your enlightenment in advance.

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

Post by support » Mon Sep 01, 2003 6:46 am

Hi,

It would most likely return "Program Manager" with X,Y coords equal to your screen resolution. But I can't guarantee this. There are never "no more windows running".
MJT Net Support
[email protected]

Lumumba

Post by Lumumba » Mon Sep 01, 2003 10:32 am

Desktop (window name: Program Manager).
If the focus is on the Taskbar, you won't get a window name.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Sep 02, 2003 12:24 am

Lumumba and Support,

The two scenarios you narrate are exactly what I have encountered. In particular, Lumumba clearly indicates that no window name will be returned. With Message>, I can see it's a special (non-printable)character. The question here is what the ASCII code and the length of the character (string) is stored in the Window_Title.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Sep 02, 2003 1:45 am

:idea: Use Message to tell you the length also.

:idea: How about this to get ASCII value?.....maybe write the result to a file and open with a text editor? :?:

Maybe this will trigger a better idea..........good luck,
Bob

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Sep 02, 2003 2:59 am

Bob,
Many thanks for your awakening enlightenment. You're right. The easiest way is to write it to a text file and to be examined by a text editor. Thanks again.

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