VoiceGuide IVR Software Main Page
Jump to content

Result Variables Returned From Running Prog

Recommended Posts

I am trying to integrate a wave editor program into the script. I want to be able to record and edit all my VG recordings over the phone. Quality of sound is not an issue here.

 

For this I use (Run Another Program) module to start my wave editor program. In my editor I have a explorer that allows me to pick a wave file. This file along with it's directory is written to SHLRESLT.TXT like this-

 

WriteFile("[NewWaveFile]{" & ExpTree1.SelectedItem.Path & "\" & Filename & "}")

 

This all works. But I am having trouble picking up the SHLRESLT.TXT with VG.

 

I loop with a Evaluate expression to pick up the SHLRESLT.TXT and when it returns "$RV[NewWaveFile]" > ""

 

path if true goto Play module

path if false loop again

 

I want VG to play the "$RV[NewWaveFile]" sound file. When SHLRESLT.TXT is written by my other program. And of course eventuly rerecord them. By the way I do not wait for the wave editor program to close because this will be an on going proccess.

 

Does Evaluate module check for the SHLRESLT.TXT at each loop? What am I doing wrong.

Share this post


Link to post

Yes I started looking at the com object this morning and decided to start useing the com object. I have used the text file before and decided before breaking new ground, I would get the script to work :-) the way I though I knew how.

 

So based on your reply, I have to ask.

Will the com object do what the Text file can't in this case?

 

Will the Evaluate module look at the com object even when it dosen't look at the text file?

Share this post


Link to post

The functions mentioned set a Result Variable, and this Result Variable can then be used by any module ran after the function has been called.

Share this post


Link to post

Ok here is what I have. It looks simple enough. But still won't work

 

Sub formatcommand()

VoiceGuideCommandLink("[NewWaveFile]{" & ExpTree1.SelectedItem.Path & "\" & NewWave & "}")

End Sub

 

Sub VoiceGuideCommandLink(ByVal ReturnVaraiables As String)

Dim vg = CreateObject("VoiceGuide.CommandLink")

vg.Run_ResultReturn(6, ReturnVaraiables)

wait(2) 'Wait 2 seconds - Don't know if I need this

vg = Nothing

End Sub

 

VB Watch says ReturnResults = "[NewWaveFile]{C:\Program Files\VoiceGuide WatchDog\OldInterest2\11[19[2005 11;56;22 PM.Wav}"

 

My evaluate Expression module contains

 

"$RV[NewWaveFile]" > ""

 

Paths

on {false} goto [Evaluate New Wave File Name] 'This just loops looking for a name

on {true} goto [PlayNewWaveFile] ' This would play file I selected in other program

 

 

I used line Id as 6 because I first ran a evaluate module to see what it was.

But how do I pick line Id up in vb program code.

 

The "$RV[NewWaveFile]" never recives a value and always evaluates to "" > ""

 

What am I doing wrong?

 

P.S. This VB code starts VG which I thought was interesting :-)

Share this post


Link to post

I guess I can pick the line ID up when I use the run module as a switch but I hope there's a better way

Share this post


Link to post
But how do I pick line Id up in vb program code.

$RV_LINEID.

 

If you do not know about $RV_LINEID then you should probably have a read though the Help file's entries on Run VBScript module.

 

Where are you calling this VB code from? some external program before you even start the VG script?

 

Maybe it'd be best for you to explain what you are trying to achieve as well - we could then suggest the simplest approach to get this done.

Share this post


Link to post

I market a fairly complex script that works well. 150 calls a day on average. VG is vary good!

 

I market my system of programs and scripts. Since it is a system I want the client to be able to rerecord the messages. For example the “Please enter your password” etc.

I can not ask my clients to shell out $500 for a dialogic card and then tell them they will need to install a sound card to. Besides then the sound card will need to be configured etc.

My solution is to have VG record or rerecord the sound files. So in there VG administration menu I have added a selection for recording wave files.

If they chose that option I warn them they must be in front of computer.

 

Next I use a run module to start my wave editor with the command switch $RV_LINEID.

This gets the line ID to my wave editor.

 

Now in the wave editor, they pick a wave file to edit.

 

I WANT to send the path and file name, back to voice guide to play or record. I do not want to close my wave editor, so I can pick another wave file to edit, when I am done with first.

 

I know this is possible and could do it with a database, but that is cumbersome. Would much rather use command object.

Share this post


Link to post

As soon as the RV is set through a COM function it will be available for the script to use.

 

If you continue to have problems please post a copy of VoiceGuide's Debug Printout which captures the problem, this will allow us to see what happened.

 

When running the script click on VoiceGuide's View menu and select 'Event Trace Log' option - any log information will then appear in this window. You must open the trace window before making the call.

 

You can enable the automatic saving of the logs to files in \log\ directory as well.

 

When posting traces please .ZIP them up and post them as attachments.

Share this post


Link to post

OK I found the problem with com object. Its not supported in pro version. And since I won't ask my clients to buy enterprise version, I will do it with a text file or database. Thanks anyway.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×