VoiceGuide IVR Software Main Page
Jump to content

Modify Vbs Script

Recommended Posts

Hi, I am trying to incorporate a VBS script into voiceguide which currently runs in excel as an additional module.

What happens in excel is that you enter the serial number and it generates a 4 digit code for you.

I have taken the vbs part out of excel and would like voiceguide to run this script and generate the code instead of excel.

Any help would sincerely be appreciated. I dont really know vb scripting at all.

Regards, Eric (I have attached the current VBS script as a text file which is in excel as a module.).

Share this post


Link to post
Have you tried placing the script in a VBScript module and using the Run_ResultReturn function to return data back to VoiceGuide? Please see: http://www.voiceguide.com/vghelp/source/html/modvbs.htm

 

If you can post your VBScript and your current VoiceGuide script here then we can assist in getting the VBScript module to a working state.

 

When i try to post the vbs files i get an error. should i rename them to txt????

Share this post


Link to post

The attached version shows the approach to take.

 

We did some modifications to the Visual Basic function provided to make it work as a VBScript but modifications are still not complete in the uploaded file.

The Visual Basic function provided has to have it's "Next" statements modified and the "Val" functions removed to make the VBScript interpreter work. Maybe there are some other changes as well.

 

To convert and test the entire function would take too long and is outside the scope of this free support forum. Please contact sales@voiceguide.com if you would like us to perform this work though.

Get_Code_Voiceguide.vgs

Share this post


Link to post

I haven't looed at your code, but I just thought thaty I would mention that you can simulate a Val in vbs by adding a VBS function:

 

function Val(x)
if x = "" then 
  Val = 0
else
  Val = clng(x)
end if

 

Change cLng to suit the data type, eg: cInt may be more suitable

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
×