Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: timewait
while 1 TimeWait("0000:00:00:22:00:00") ; do stuff here TimeDelay(60) endwhileHere is an example of a scheduling program from one of our users:
; openmimi.wbt ; This program will run a program called "MIMI.EXE" ; from the location and at the time specified in an ; ini file called "OPENMIMI.INI". It will also use ; sendkey to send a command (supplied by the ini file) ; to MIMI.EXE after MIMI.EXE runs. ; Open ini file and ; 1) read location of program to run ; 2) read sendkey info to supply program when it runs ; 3) read start time ; Example of the 3 entries in the ini file: ; line 1> C:\MIMI\BIN\MIMI.EXE ; line 2> C:\MIMI\CASES\DEMO.CAS ; line 3> 0000:00:00:12:30:00 params=fileopen("c:\winnt\openmimi.ini","READ") x=FileRead(params) mimi=x x=FileRead(params) mimicase=x x=FileRead(params) starttime=x FileClose(params) ; Wait until start time occurs TimeWait(starttime) ; If program is already running then activate, ; otherwise execute the program If WinExist("MIMI") == @TRUE WinActivate("MIMI") Else Run("%mimi%"MIMI.EXE, "") Endif ; Fill the screen the the program you ran WinZoom("MIMI") ; Send the info read from the 2nd line of the ini file ; to the program SendKey("!fo!n%mimicase%~") ; End this little program Return
Article ID: W13893
Filename: TimeWait Scheduling Routine.txt
File Created: 2001:04:30:10:12:48
Last Updated: 2001:04:30:10:12:48