VoiceGuide IVR Software Main Page
Jump to content

Really Useful Suggestion For Vbs Module

Recommended Posts

Guys, I wonder if you could add the following feature sometime in the future (or as soon as you like) as I think it would be a great improvement to the VBS module and prove really useful..!

 

I frequently find myself exiting VBS modules by using the "vg.Script_Goto" in an "if-then", so, if variable a=1, goto script/module XX otherwise, goto script/module BB... and hardly ever using the "success" path defined for the script.

 

So, its just occurred to me, why not return "1", "2" or "x" INSTEAD of just "success" to the module so it can be used in the path settings for the module? THEN, you can set the paths up using the right-click path settings, the names would be auto-maintained when a script name changes (in the current script at any rate) AND you can have say 10-12 exit paths (0-9 plus star/hash).

 

so:

on {1} goto [next module1]

on {2} goto [module2]

etc...

 

The tricky part is having the VBS module return a single "path" value eg: "1" AND a list of RV values. I guess you can set the RVs separately before exiting, but ideally, you would want to exit like this:

 

vg.Run_ResultReturn iLineID, "1[RVa]{555}[RVb]{hello world}"

 

For all I know, it may already work like this, so I will do a little testing, but if it doesn't I think this would be a great new feature/enhancement and surely very simple to do!

Share this post


Link to post

Whoopee! IT DOES WORK LIKE THIS! (serves me right for not checking b4 posting!)...

 

But: As the following test code shows, you have to set the RVs prior to exiting the module:

 

set vg = CreateObject("VoiceGuide.CommandLink")
vg.RvSet_RvList $RV_LINEID, "[TEST1]{ABC}[TEST2]{DEF}[TEST3]{GHI}"
vg.Run_ResultReturn $RV_LINEID, "123"
set vg = nothing

And in the log you can see the RVs, and the module return value (123) and the pathed module "[PlayTest]"

114442.70 17 Run Script waiting. iRunWait=1 (shellid=3048, process=1204)

114442.71 17 timer set 1 EV_TIMEOUT_CHECKONSTATE

114442.79 17 cl RvSet_RvList [TEST1]{ABC}[TEST2]{DEF}[TEST3]{GHI}

114442.81 17 rv ns add [TEST1]{ABC}

114442.84 17 rv ns add [TEST2]{DEF}

114442.87 17 rv ns add [TEST3]{GHI}

114442.90 17 cl Run_ResultReturn >>123<<

114442.92 17 rv lg add [Run VB Script 31_ResultReturn]{123}

114442.95 17 cl module's runwait=1, WavPlayHasNowFinished=0

114442.98 17 timer clear

114443.01 17 state [PlayTest] Playing

(test script attached - why can't we just add vgs files instead of zipping them?)

vbs_path_test1.zip

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
×