Jump to content
Macro Express Forums

Wait Window Functionality


digichaos

Recommended Posts

I am using the Wait Window Lose Focus ability but it doesnt seem to use the functionality that I would like.

 

I basically want the Wait Window lose Focus function to wait 30 minutes for the window to lose focus and if it has not, continue with the macro. But it seems that if the 30 minutes are up... the macro aborts.

 

That really doesn't seem logical to me. I didn't tell it to abort... so it shouldn't.

 

Is there any way around this?

Link to comment
Share on other sites

The Wait For Window Title command has two options. One is to wait indefinitely, and the other is to wait for a certain time period. If you wait indefinitely, the macro will wait until the window has lost focus even if it is several days. If you wait for a time period, the macro will abort if the condition is not true. Instead you should try using the If Window Title On Top and If Not Window Title On Top commands in a repeat loop. Below is an example of the code that I used to test the condition. You will need to modify the delays to fit your time allotment.

 

Repeat Until %N1% = 60
 Delay 10 Seconds
 If Not Window Title "notepad" on top
   Text Box Display: Test
   // The break command will exit out of the loop if the Window loses focus, otherwise
   // it will continue on until %N1% = 60
   Break
 End If
 If Window Title "notepad" is on top
   OR
 If Variable %N1% = 60
   Text Box Display: Test
 End If
 Variable Modify Integer: %N1% = %N1% + 1
Repeat End

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...