Jump to content

< Back to Forum


Read Config File

  • Please log in to reply

#1 ThaoHuynh 10 November 2017 - 02:18 PM

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.

#2 SupportTeam 10 November 2017 - 02:50 PM

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:




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:






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


more information on above method:








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






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



#3 ThaoHuynh 10 November 2017 - 08:53 PM

Yeah, it's worked for me. Thank you so so much