jewillis Report post Posted 08/03/2009 05:05 PM I have a simple task but can not get it to work. I have a user enter a time i.e. 1130, then i have them enter a "1" for AM or "2" for PM. I am trying rake the value from the Capture Enterend Module and if they entered a "2" add 12 to the number and pass it to a Say Numbers so I can have them verify their entry 1130 PM or if the enter a 1 - just pass the value ant wil will say 1130 AM Jeff Share this post Link to post
SupportTeam Report post Posted 08/03/2009 08:57 PM Please post your current script and an excerpt from vgEngine trace capturing the call. Share this post Link to post
jewillis Report post Posted 08/04/2009 03:24 AM attached. The script is a subset of the larger working script. It is this portion that I can not get to work. what i need is the ability to accept input and if less than 12, the add 12 to the number. jwtest1.vgs 0803_ktTel.zip Share this post Link to post
SupportTeam Report post Posted 08/04/2009 04:07 AM Please see attached script. The module [ArrivalTime] can also be removed if the TTS text is saved to a .txt file and that .txt file is played from the [GetArrival] module. add1200.vgs Share this post Link to post
jewillis Report post Posted 08/04/2009 08:24 PM Thanks! works great - one issue maybe you can help with. If they enter three digits, how can I prepend a zero "0" to the RV Jeff Share this post Link to post
SupportTeam Report post Posted 08/04/2009 09:25 PM You would need to use either a VBScript or two Evaluate expression modules to do this. In a VBScript module something like the below would be used: if len("$RV[timein]") = 3 then sDay = "0" & "$RV[timein]" else sDay = "$RV[timein]" end if set vg = CreateObject("vgServices.CommandLink") vg.Run_ResultReturn $RV_LINEID, "[time4digits]{" + sDay + "}" set vg = Nothing If using two evaluate expression modules the fist module would have this expression: len("$RV[timein]") then you would have a path like this: on {3} goto [addo0tofront] and addo0tofront would be another Evaluate Expression module which does this: "0" + "$RV[timein]" and saves the result to new RV, eg: time4digits Share this post Link to post