After reading in the result file, VoiceGuide will rename the file by adding a ".last" to the filename.
Timeout Paths When used in Run Program module, a Timeout Path can be used to limit the maximum amount of time the module will wait for the called program to finish (when "Wait until program finishes" option is selected). When the timeout is reached the module will close the program it has called, and go the module specified in the Timeout Path.
Example 1:A custom written utility ReadData.exe to retrieve information about a product has been written and the system has a Get Number Sequence module called Get Data Type which is used to ask caller to select what data is to be retrieved. The ReadData.exe is then called with the information entered in Get Data Type passed as a parameter.
SHLRESLT.TXT is then be used to return the retrieved data. ReadData.exe writes the following data into the file:
The above will create 3 new Result Variables in VoiceGuide, which can be accessed using: $RV[Product_Price] whose values are: 1495 respectively. These Result Variables can then be used is Say Numbers modules to speak out this information to the caller.
Example 2:The Run Program module can be used to write out data that the caller has entered into a file. The command below will write out the 3 pieces of data gathered in Get Number Sequence modules out into the file output.txt: command.com /c echo $RV[GetUserId], $RV[GetProductID], $RV[GetOrderAmount] >> c:\output.txt Use ">" instead of ">>" if you would like to overwrite the output.txt file instead of appending to it. Always specify the full path of the file to which the output is echoed - if you do not specify the full path sometimes the output file will not be in the scripts' directory. Note: If writing to same log file from subsequent modules in same script or from multiple lines then it's preferable to use the Run VB Script module to write log files, as the DOS echo command does not handle concurrent writing to the same file well.
Example 3: Sound Recorder application specifying that it should play the specified sound file and then close afterwards using this command line: sndrec32 /play /close c:\test.wav The Media Player application can also be used for this purpose: mplayer /play /close c:\test.wav If you are finding that the program does not run as VoiceGuide cannot find it then try specifying the full path to where your program is on your system. For example, the Media Player program on some systems is actually in: C:\Program Files\Windows Media Player\mplayer2.exe which would make the actual command line required to be used in the Run Module: C:\Program Files\Windows Media Player\mplayer2.exe /play /close c:\test.wav Example 4:Send a message to another computer, alerting a particular user of an event. eg. when the caller on the VoiceGuide system is about to be transferred to their extension. Windows NT/2000/XP : Can use the NET SEND command (type "net help send" for full command syntax) : net send someusername "VG call from $RV_CIDNUMBER" Windows 95/98/ME : need to use a 3rd party message product like Vypress Messenger or RealPopup.
Example 5:Running batch files (.bat) directly from the Run Program module does not work on some systems. (A combination of PATH and other system settings is the cause). To run a batch file from a Run Program module it is best to create a shortcut (a link) to the batch file and run the shortcut itself. You may need to use the actual name of the file as shown when doing a DIR listing in the DOS Command Prompt window.
Example 6 (using old result file format) :Here is an example of the command line which can be specified in the Run Program module: C:\MyProgram.exe $RV[Get UserID] $RV[Get CC] You can still use the v2.9 way of returning results to VoiceGuide. Two examples of the contents of the result file which is expected by VoiceGuide are shown below: SUCCESS or FAIL The second line in the result file will become the value for this module's Result Variable, and the Success or Fail will determine if the Success or Fail path is taken - if none of the Paths match the Result Variable value. The following rules are used when using the old style result files:
Example 7: Concatenation of sound files can be done using the
"shntool" utility.
Example 8:The Run Program module can be used to run a VB Script or a Java Script in the Windows Script Host, by calling the csript.exe and wscript.exe script interpreters, with the filename of the script to run as an argument. For more information on Windows Scripting Host see: |
|||||||||||||||||||||||||||
| Converted from CHM to HTML with chm2web Pro 2.7 (unicode) |