WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to 'wait until no input'

Keywords: 	 'wait until no input' aMsgTimeout

Question:

I am new to Winbatch. I have a wbt file set to run at a specific time, to close, then re-open, a program. It works fine. However, I'd like to insert a line to ensure that the program in question didn't close if I were actively working in it. Can anyone tell me how to do that? Something that said "Wait until no input for 60 seconds" or similar, would be great.....

Answer:

Maybe look into the ShellOperations extender and the aMsgTimeout function.

That way you can pop up a message for - say - 5 minutes. And if no one responded to the message (like to maybe request a reschedule or tell it to wait for say 60 minutes and try again, then you can continue with the process, for example:

AddExtender("wwsop34i.DLL")

While 1
   xx = aMsgTimeout (10,"WARNING","About to close and reopen Eudora","Go ahead","Don't")
   If xx == 3
      Message("Delay process", "Will ask again in 10 minutes")
      TimeDelay(600)
      Continue
   EndIf
   Break
EndWhile

If WinExist("~Eudora")
   WinClose("~Eudora")
EndIf
TimeDelay(5)
DirChange("c:\Program Files\Qualcomm\Eudora")
Run("Eudora.exe" ,"") 

Article ID:   W15524
File Created: 2003:05:13:11:28:30
Last Updated: 2003:05:13:11:28:30