OK I have figured out how to send the email. I have created a batch file that runs blat.exe which sends the email. I can run the example shell script on an interval basis, but how do I get the script to trigger on motion. When I check the motion box it does not run the script. I must have to change the Public Sub name but can't figure out how. Any help is appreciated.
Lance
'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("c:\motion.bat",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