I'm using WaitWindowChanged>5 to wait for a webpage to load. The webpage easily loads within that amount of time, however my next statement:
MessageModal>WWC_RESULT
always returns "FALSE". So WaitWindowChanged is useless for my purposes in this situation.
I don't think this command is doing what I think it's supposed to be doing. Can anyone help please?
thanks in advance,
WaitWindowChanged - What does it do?
Moderators: Dorian (MJT support), JRL
-
- Macro Veteran
- Posts: 247
- Joined: Fri Apr 15, 2005 8:32 am
WaitWindowChanged waits for a change in foreground window. It won't help you wait for a web page to load. Instead use VBScript and IE's busy function:
http://www.mjtnet.com/forum/viewtopic.php?t=1511
http://www.mjtnet.com/forum/viewtopic.php?t=1511
MJT Net Support
[email protected]
[email protected]
-
- Macro Veteran
- Posts: 247
- Joined: Fri Apr 15, 2005 8:32 am
WaitWindowChanged does not look at the contents of the window, but which window has focus. The Foreground window is the one with the dark blue title bar at the top (in a default colour scheme), and is the active window for all input.
Waitwindowchanged will return a true once the focus has been moved to another window.
I was trying a similar thing to you, until I realised what was happening...
Take care, Ian
Waitwindowchanged will return a true once the focus has been moved to another window.
I was trying a similar thing to you, until I realised what was happening...
Take care, Ian
Foreground Window = The Active Window. The one in front of any other window and active. In front of. Hence Foreground.
MJT Net Support
[email protected]
[email protected]
-
- Macro Veteran
- Posts: 247
- Joined: Fri Apr 15, 2005 8:32 am
Just a suggestion, it may be helpful for beginners to clarify that the WaitWindowChanged waits for a change in the foreground window "to another window". As is, a literal interpretation should include any change in the window including the blue loading bar at the bottom of a browser, the tiny visual effects of a button click, etc. Yet those changes don't trigger the WaitWindowChanged function.support wrote:WaitWindowChanged waits for a change in foreground window. It won't help you wait for a web page to load. Instead use VBScript and IE's busy function:
http://www.mjtnet.com/forum/viewtopic.php?t=1511
One step ahead of you. The 7.4 help file says:
"This command causes Macro Scheduler to wait until the foreground window changes. I.e. the foreground window's title (caption) changes, or a different window becomes the foreground window. "
"This command causes Macro Scheduler to wait until the foreground window changes. I.e. the foreground window's title (caption) changes, or a different window becomes the foreground window. "
MJT Net Support
[email protected]
[email protected]