Guest hitesh Report post Posted 11/11/2003 09:31 AM hi i just want to know how to generate an error in VB Script so that it goes to the failure path tks - Hitesh Share this post Link to post
SupportTeam Report post Posted 11/11/2003 11:27 AM Use the VoiceGuide's COM interface to return the result back to VoiceGuide. If you just want to return "fail" you can use: set vg = CreateObject("VoiceGuide.CommandLink") vg.Run_ResultReturn $RV_LINEID, "fail" set vg = Nothing Share this post Link to post
Guest hitesh Report post Posted 11/11/2003 12:34 PM i tried it but its giving me an error "ActiveX can't create object "Voiceguide.Commandlink" tks - hitesh Share this post Link to post
SupportTeam Report post Posted 11/11/2003 12:59 PM Which version of VoiceGuide are you using? Only v5.0 onwards supports COM interface. Before that you needed to use a "Result File" to return information to VoiceGuide. Please read the VG Help file's sections on "VB Script module" and "Run Program module" for more information on Result Files.. Share this post Link to post
Guest hitesh Report post Posted 11/11/2003 01:04 PM the help file is not explaining this concept properly could u pls do that for me tks - Hitesh Share this post Link to post
SupportTeam Report post Posted 11/11/2003 09:21 PM The Result File needs to be called VGRUNRESULT_LineNumber.TXT The syntax for the Result File can be: SUCCESS|FAIL Result Variable There is sample code provided in the "Run VB Script Module" section of VG Help file: Function WriteResultFile(strResult) Const ForReading=1, ForWriting=2, ForAppending=8 filename = "VGRUNRESULT_$RV_DEVICEID.TXT" Set fso = CreateObject("Scripting.FileSystemObject") Set ts = fso.OpenTextFile(filename, ForWriting, True) ts.WriteLine(strResult) ts.Close WriteResultFile=0 'always deallocate after use... set ts = Nothing set fso = Nothing end function Share this post Link to post
Guest hitesh Report post Posted 11/14/2003 06:26 AM where should i place these result files b'coz when i put this function in my script, it gives an error "file not found" and where should i use this function in my script and what value to be passed for the function (value of strResult) tks - Hitesh Share this post Link to post
SupportTeam Report post Posted 11/14/2003 07:55 AM The result files should be placed in the same directory where the script (.VGS file) is located. strResult should be assigned whatever the result file should contain. most of the time that's just "success" or "fail" Share this post Link to post