mikeraut Report post Posted 04/23/2013 08:59 AM I would lke to use the VBS module to check if prompt1.wav exists. If YES then I want to go back to the vg.vgs module for further processing If NO then I want to go back to the vg.vgs module for further processing Could someone please check/correct the code snippet to achieve the desired result. __________________________________________________________________________ Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists("C:\Program Files\VoiceGuide\Scripts\Prompts\prompt$RV[Get Numbers].wav") Then vg.Script_Goto "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "Play Prompt" Else vg.Script_Goto "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "EvaluateDigitsFail" End If Share this post Link to post
SupportTeam Report post Posted 04/23/2013 09:18 AM For VoiceGuide v7 use: set vg = CreateObject("vgServices.CommandLink") set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists("C:\Program Files\VoiceGuide\Scripts\Prompts\prompt$RV[Get Numbers].wav") Then vg.Script_Goto "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "Play Prompt", "" Else vg.Script_Goto "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "EvaluateDigitsFail", "" End If set vg = Nothing set objFSO = Nothing See: http://www.voiceguide.com/vghelp/source/html/com_script_goto.htm Share this post Link to post
mikeraut Report post Posted 04/24/2013 04:15 AM The vbscript appears to ignore the fact the prompt26.wav does not exist (line 852), and moves on to the next module Play Prompt. 0424_ktTel.zip Share this post Link to post
SupportTeam Report post Posted 04/25/2013 11:13 AM It looks like the module [Run VB Script Digits] is not set to wait for the VBScript to return. If you want to let the ran VBScript to return data to VoiceGuide and have VoiceGuide act on that data then you need to select the "Wait until script completes" option. Please see http://www.voiceguide.com/vghelp/source/html/modvbs.htm - setion "Wait until script completes option" If you still encounter issues please post the script used along with the traces. Share this post Link to post
SupportTeam Report post Posted 04/25/2013 11:20 AM Looking at the VBScript again, it appears to have some issues as well. $RV_LINEID is missing. Please see: http://www.voiceguide.com/vghelp/source/html/com_script_goto.htm The script should be: set vg = CreateObject("vgServices.CommandLink") set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists("C:\Program Files\VoiceGuide\Scripts\Prompts\prompt$RV[Get Numbers].wav") Then vg.Script_Goto $RV_LINEID, "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "Play Prompt", "" Else vg.Script_Goto $RV_LINEID, "C:\Program Files\VoiceGuide\Scripts\Prompts\Prompt Menu.vgs", "EvaluateDigitsFail", "" End If set vg = Nothing set objFSO = Nothing All the code ran from "Run VBScript" type modulas is saved as .vbs files in VoiceGuide's \temp\ subdirectory. You can test how that VBScript runs by just double clicking on relevant file. Any errors tht VBScript would have will then show is a displayed dialog box. Share this post Link to post