I'm still struggling with V6 (

Briefly: I have code opening and processing email messages in Outlook. As each message is completed, it is moved to a different folder. Eventually, the Inbox should be empty. When this happens, I want to go to another mailbox and repeat these actions until it is clear as well. The number of messages is an unknown and I could only think of two ways to identify when the boxes are empty. One is to use the viewing pane in Outlook and use the code "FindWindowWithText". The problem with using this method is that the viewing pane can be very slow to load an existing message so the script sometimes ends prematurely.
The other way I thought of to identify if I've reached the end is to try to locate the open message using WaitWindowOpen. If there's no messages left, no window opens so this should be the cue for the script to move on to the next email box or to end the script until the next scheduled run.
I just don't seem to be able to get the right result from WaitWindowOpen. This is the code I'm trying to use based on how I interpreted the Help files:
Let>WW_TIMEOUT=5.0
WaitWindowOpen>Approved Application*
If>WW_RESULT=FALSE,NoMessages
Label>NoMessages
Message>There are no message windows open.
I've run a log file and the result is that everything hangs at the WaitWindowOpen command.
I've checked for trailing spaces. I've read through a heap of examples in this forum and the Help files. I still can't get it right. I had a far more basic script running but it was very inefficient so I thought I would try to "improve" on it. Please point out where I am going wrong.
TIA.

J