Getting window identifiers and using them?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jtgalkowski
Newbie
Posts: 5
Joined: Wed Nov 26, 2003 7:49 pm
Location: Endicott, NY, USA
Contact:

Getting window identifiers and using them?

Post by jtgalkowski » Thu Dec 04, 2003 3:29 pm

I am a user of WinBatch a couple of years back but find MacroScheduler both easier to use and able to achieve more with more compact code. I have a suggestion, however. If it's more appropriate to discuss this in the technical forums, I will do that as well.

In your View System Windows tool, among the other attributes that are displayed are numbers which are, I believe, the Windows identifier of the particular instance existing of the window of that name at the time. I believe these numbers remain the same for the lifetime of the window.

I wish MacroScheduler had a facility where the window in focus could be interrogated to produce that number and then it was possible to SetFocus> using that identifier as well as a name. This would allow a scripter to unambiguously return to another window without having to match on title and, then, in the case of ambiguity, copy all its text to the ClipBoard to identify it. (I have such a case in an application right now, where two Web browser windows in IE have exactly the same title. I have a workaround but it's a pain.) Similarly, it'd be nice to have window ID-specific flavors of CloseWindow>, GetWindowPos>, GetWindowText>, MoveWindow>, ResizeWindow>, WaitWindowChanged>, WaitWindowClosed>, and WindowAction>.

However, in the short term I'll settle with being able to SetFocus> it using the window ID and getting the ID. WaitWindowChanged> is a close runner-up.

Any possibility of this?

Is there any API where developers can extend MacroScheduler with DLLs?

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