'This sample script shows how to execute an external program. This may be useful to call batch files, 'for example. 'In the Script Setup window, set the interval to the speed you want to call this procedure. 'If you set it to 1 second, you will see a new Notepad window popup each second! Public Sub Interval() Call ShellRunExample End Sub Private Sub ShellRunExample() Dim oShell Dim ReturnValue Set oShell=CreateObject("WScript.Shell") ReturnValue=oShell.Run("notepad.exe",1,False) 'See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp 'for detailed notes on the Run method. 'Brief: 'First Argument: strCommand, command line you want to run and any parameters ' You can also specify a file if it's type is registered and it will automatically call ' the associated program and load the file (i.e. "myworddoc.doc") 'Second Argument (Optional): intWindowStyle, 1=default (11 different values -- see link above) 'Third Argument (Optional): bWaitOnReturn, True=Wait for program to finish before returning to ' script, False=Continue script 'Note: If you decide to wait for the program to finish, ImageSalsa will stall until the program ' returns and your script completes. If you want to run a DOS batch file and wait until ' the batch file completes, you can echo to a new file as the last line of the batch file. ' Then, make periodic script calls until the file is present (using the FileExists method ' of the File System Object Model. It is also recommended that you wait a couple more ' seconds for the batch file to exit and clean up. 'Return Value: Numerical value returned from program. If bWaitOnReturn=False, returns 0. End Sub