VoiceGuide IVR Software Main Page
Jump to content

Call Created Variables From Vbscript

Recommended Posts

I have this in my VBScript Module:

 

 

function ldgz(ByVal N) ' N presumed integer

if (N>=0) and (N<10) then ldgz= "0"+Cstr(N) else ldgz=Cstr(N)

end function

Mo = ldgz(Month(Now))

Dy = ldgz(Day(Now))

Hr = ldgz(Hour(Now))

Mi = ldgz(Minute(Now))

Sc = ldgz(Second(Now))

sStamp = "0001_" & CStr(Mo) & CStr(Dy) & CStr(Hr) & CStr(Mi) & CStr(Sc) & "_1_5_" & $RV_CALLEDNUMBER & "_"

 

 

msgbox(sStamp)

 

and I have this on my in my Record Sound File Module under "Sound File to Record":

 

C:\Program Files\VoiceGuide\data\VmSave\$RV[sStamp].wav

 

I'm not to sure why the sStamp Variable is not going through to other modules. It reads correctly in the msgbox that pops up, but it saves the file as if sStamp has not been assigned (The Sound file has no iconname).

 

Can you please tell me what I'm doing wrong. I feel that I'm not calling the variable right, or variables created in VBScript modules are only available to itself, and no other module. Please let me know how to resolve this issue.

Thank you,

Thomas Vanderhoof

Share this post


Link to post
or variables created in VBScript modules are only available to itself, and no other module.

Correct. Variables you define within some VBScript do not get saved and made available throughout the entire VoiceGuide script...

 

If you want some bit of information available to rest of the VoiceGuide Script then you have to create a Result Variable holding that information..

 

Use RvSet or RvSet_RvList COM functions to create the Result Variables which then can be used throughout the rest of the VoiceGuide script. Online copies of the two Help file entries covering these function calls are here:

http://www.voiceguide.com/vghelp/html/com_RvSet.htm

http://www.voiceguide.com/vghelp/html/com_...vSet_RvList.htm

Share this post


Link to post

Thank you, I did not know of that command with in VG. It worked perfectly.

-Thomas

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
×