If a window, say Calendar - Microsoft Outlook, is already opened, what's the difference(s) between: SetFocus>Calendar* and WaitWindowOpen>?
BTW, SetFocus often cause Specified Window "XXXXXXX" not present while WaitOpenWindow works perfectly under the identical condition.
I suppose SetFocus> is a subset of WaitOpenWindow>. That's, WaitOpenWaindow also includes the function of SetFocus. Please correct me if I'm wrong.
SetFocus> is more troublesome in setting focus to a particular window.
Armstrong
Hong Kong
Nuance between SetFocus> and WaitWindowOpen>
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
SetFocus will activate the specified window - i.e. will attempt to make sure it is the foreground window with the focus. WaitWindowOpen simply waits until the window exists but does not activate it or focus it. Both use the same techniques to find the window so are subject to the same rules.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Marcus,
Your explanation makes more sense. On the other hand, in page 79 of command_ref_7.1.pdf, the second paragraph clearly indicates that waitWindowOpen will attempt the setfocus. That's how I was confused. That's why I presumed SetFocus non-performing.
Microsoft Outlook XP is the best target practice to gain in-depth understanding of Macro Scheduler script. Outlook XP alone can open simultaneously multiple windows. In accordance with your clarification, I should write the following code to return back to Calendar window:
WaitOpenWindow>Calendar - Microsoft Outlook
SetFocus>Calendar -Microsoft Outlook
in order to meet the following critieria:
1. The current active window could be any window other than Outlook.
2. Return back to Outlook's Calendar folder/view.
Look forward to your comment. Many thanks in advace.
Armstrong Wong
Hong Kong
Your explanation makes more sense. On the other hand, in page 79 of command_ref_7.1.pdf, the second paragraph clearly indicates that waitWindowOpen will attempt the setfocus. That's how I was confused. That's why I presumed SetFocus non-performing.
Microsoft Outlook XP is the best target practice to gain in-depth understanding of Macro Scheduler script. Outlook XP alone can open simultaneously multiple windows. In accordance with your clarification, I should write the following code to return back to Calendar window:
WaitOpenWindow>Calendar - Microsoft Outlook
SetFocus>Calendar -Microsoft Outlook
in order to meet the following critieria:
1. The current active window could be any window other than Outlook.
2. Return back to Outlook's Calendar folder/view.
Look forward to your comment. Many thanks in advace.
Armstrong Wong
Hong Kong