VoiceGuide IVR Software Main Page
Jump to content

Read Config File

Recommended Posts

Hi VoiceGuide Team,

 

I would like to get some parameters to use in scripts, so can i create a config file ( content parameters ...) in another direction and read it to get these parameters in VoiceGuide scripts?

 

Thank you for your support.

Share this post


Link to post

You can create a file that contains data in "Result Variable Definition" format and read that in during the script.

 

eg. if a file localinfo.txt contains this text:

 

[branchname]{seaside}[waittime]{20}[supervisortel]{5551234}

 

then you can read it into VoiceGuide using a Run VBScript module and this code:

 

set fso = CreateObject("Scripting.FileSystemObject")
set fileLocalData = fso.OpenTextFile("C:\localinfo.txt")
sEntireFile = fileLocalData.ReadAll
set fileLocalData = Nothing
set fso = Nothing
set vg = CreateObject("vgServices.CommandLink")
vg.Run_ResultReturn $RV_LINEID, sEntireFile
set vg = Nothing

 

and you will then be able to use the following $RVs in your script:

 

$RV[branchname]

$RV[waittime]

$RV[supervisortel]

 

which will have values of: seaside, 20 and 5551234 respectively.

 

more information on above method:

 

http://www.voiceguide.com/vghelp/source/html/com_run_resultreturn.htm

 

http://www.voiceguide.com/vghelp/source/html/modvbs.htm

 

 

 

$RV variables can also be set in VG.IN, in section [scripts], by setting entry GlobalRV

 

eg:

 

GlobalRV=[branchname]{seaside}[waittime]{20}[supervisortel]{5551234}

 

You can also use a Database Query module to retrieve specific data from databases or Excel files etc.

 

http://www.voiceguide.com/vghelp/source/html/moddbquery.htm

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
×