VoiceGuide IVR Software Main Page
Jump to content

Vbs Script

Recommended Posts

hi.. i developped this script in the trial demo, and worked fine :

 

Dim xlApp, xlBook, xlSht

Dim filename, value1, value2, value3, value4

 

filename = "c:\test.xls"

 

Set xlApp = CreateObject("Excel.Application")

set xlBook = xlApp.WorkBooks.Open(filename)

set xlSht = xlApp.activesheet

 

value1 = xlSht.Cells(3, 1)

valuen = xlSht.Cells(3, 2)

xlBook.Close False

xlApp.Quit

set xlSht = Nothing

Set xlBook = Nothing

Set xlApp = Nothing

 

 

on error resume next

 

Set xlApp = CreateObject("Excel.Application")

set xlBook = xlApp.WorkBooks.Open(filename)

set xlSht = xlApp.activesheet

 

xlApp.DisplayAlerts = False

value1=value1-1

 

If value1 <= 0 Then

value1=valuen

voie="gagne"

Else

voie="perdu"

End If

 

vg.Run_ResultReturn $RV_DEVICEID, "ok"

 

'write data into the spreadsheet

xlSht.Cells(3, 1) = value1

 

xlBook.Save

xlBook.Close SaveChanges=True

xlApp.Close

xlApp.Quit

 

'always deallocate after use...

set xlSht = Nothing

Set xlBook = Nothing

Set xlApp = Nothing

 

set vg = CreateObject("VoiceGuide.CommandLink")

vg.RvSet $RV_LINEID, "counter01", value1

vg.Run_ResultReturn $RV_DEVICEID, voie

set vg = Nothing

 

 

 

so i buy the pro version; at 99 $, and the line hang up when the script is running ? why ?

 

the trace is :

 

 

 

 

202828,07 6 linedevstate 2048 0 0

202828,07 6 callstate OFFERING 66051 0 4

202828,07 6 Answer the call at 30/11/2004 20:28:28

202828,09 6 lineAnswer(66051) => 66000

202828,09 6 callinfo CALLEDID

202828,10 6 callinfo ORIGIN

202828,10 6 ring 0

202828,63 6 callstate CONNECTED 66051 1 0

202828,63 6 callstate CONNECTED 66051,1,0

202828,63 6 WorkingModeTAPI@Connected=

202828,63 6 WorkingModeScript@Connected=

202828,67 6 Inband detection not enabled

202828,67 6 StartLoadedVgs at 30/11/2004 20:28:28

202828,67 6 AddRVns [scriptsPath]{C:\Documents and Settings\dave\Bureau\LE COMPTE A REBOUR\}

202828,67 6 AddRVns [scriptPath]{C:\Documents and Settings\dave\Bureau\LE COMPTE A REBOUR}

202828,67 6 rv add [$RV_STARTTIME]{30/11/2004 20:28:28}

202828,69 6 rv add [$RV_DEVICEID]{6}

202828,69 6 rv add [$RV_CIDNAME]{}

202828,69 6 AddRVns [PathApp]{C:\Program Files\VoiceGuide\}

202828,70 6 rv add [$RV_CIDNUMBER]{}

202828,70 6 tapi Reply (LineEvReply) ok 66000 0

202828,70 6 callinfo MONITORMODES

202828,70 6 timer clear

202828,70 6 [Play 1] Playing

202828,72 6 [Play 1] Playing (\\X-H9TAKYG8WW5PW\SharedDocs\final\intro.wav)

202828,73 6 play set playid=164494

202828,76 6 PlaySoundStart ok [\\X-H9TAKYG8WW5PW\SharedDocs\final\intro.wav]

202828,77 6 timer clear

202828,77 6 RunModule PLAY end

202828,77 6 wa(10311,16449400)

202828,77 6 callinfo MONITORMODES

202838,27 6 dtmf 2 (66051,50,2)

202838,27 6 ScriptEventCode 50 iLineState=1100

202838,27 6 LsPlayMsg 2

202838,33 6 PlaySoundStop err=0

202838,33 6 rv add [Play 1]{2}

202838,34 6 timer clear

202838,34 6 [Play 4] Playing

202838,34 6 [Play 4] Playing (\\X-H9TAKYG8WW5PW\SharedDocs\choix2.wav)

202838,35 6 play set playid=174118

202838,37 6 PlaySoundStart ok [\\X-H9TAKYG8WW5PW\SharedDocs\choix2.wav]

202838,37 6 timer clear

202838,38 6 RunModule PLAY end

202838,38 6 wa(30887,17411800)

202838,39 6 callinfo MONITORMODES

202841,15 6 dtmf 2 (66051,50,2)

202841,16 6 ScriptEventCode 50 iLineState=1100

202841,16 6 LsPlayMsg 2

202841,23 6 PlaySoundStop err=0

202841,23 6 rv add [Play 4]{2}

202841,23 6 timer clear

202841,23 6 [Run VB Script 19] Running VB Script...

202841,23 6 rv replace start (strlen>500)

202841,24 6 rv ns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[scriptsPath]{C:\Documents and Settings\dave\Bureau\LE COMPTE A REBOUR\}[scriptPath]{C:\Documents and Settings\dave\Bureau\LE COMPTE A REBOUR}[$RV_STARTTIME]{30/11/2004 20:28:28}[$RV_DEVICEID]{6}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Play 1]{2}[Play 4]{2}

202841,24 6 eng copy of script ran: vbs_6_1.vbs

202841,28 6 Run Script waiting... (shellid=1388, process=1464)

202841,28 6 timer set 1 EV_TIMEOUT_CHECKONSTATE

202842,13 6 cl RvSet counter01, 47

202842,13 6 ERROR: COM interface not supported in this version.

202842,16 6 cl Run_ResultReturn >>perdu<<

202842,16 6 ERROR: COM interface not supported in this version.

202842,20 6 timer fired EV_TIMEOUT_CHECKONSTATE

202842,20 6 ScriptEventCode 9007 iLineState=1501

202842,20 6 LsRunWaitTillFinished EV_TIMEOUT_CHECKONSTATE

202842,20 6 task completed (shellid=1388, process=1464) vgm=11, iRunWait=1, iRunWait_ExeResult_NextVgm=0

202842,21 6 No information returned from program to VG (no VGRUNRESULT_6.TXT or SHLRESLT.TXT)

202842,21 6 rv add [Hangup Time]{30/11/2004 20:28:42}

202842,21 6 Hanging up call... [WaitTillFinished - next module not specified]

202842,23 6 RecSoundStop ok

202842,23 6 PlaySoundStop err=0

202842,23 6 timer set 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP

202842,23 6 fnHangupCall end

202842,28 6 linedevstate 2048 0 0

202842,28 6 callstate IDLE 66051 0 0

202842,30 6 WorkingMode@Idle=

202842,30 6 timer clear

202842,30 6 timer set 1 EV_TIMEOUT_TIMETOREINITLINE

202842,30 6 tapi Reply (LineEvReply) ok 66255 0

202843,24 6 timer fired EV_TIMEOUT_TIMETOREINITLINE

202843,24 6 ScriptEventCode 9008 iLineState=900

202843,26 6 LsAwaitingCalls EV_TIMEOUT_TIMETOREINITLINE

202843,26 6 ReinitTelephony due to IDLE

202843,27 6 tapic lineDeallocateCall(MainCall:66051) 0

202843,43 6 lineOpen(6)=>

202843,43 6 Waiting for a call...

202843,43 6 LineHandle=66290

202843,44 6 timer set 3 EV_TIMEOUT_ATERIDLE_ALLOWOUT

202844,26 0 dial start any summary:|6:rdy=0|

202845,27 0 dial start any summary:|6:rdy=0|

202846,28 0 dial start any summary:|6:rdy=0|

202846,44 6 timer fired EV_TIMEOUT_ATERIDLE_ALLOWOUT

202846,44 6 ScriptEventCode 9013 iLineState=900

Share this post


Link to post

i've bought it yesterday. Can i cancel it, and take the Enterprise version ????

Share this post


Link to post

Upgrades to different version within the first month are for the difference in price.

(this is mentioned on our WWW order for as well)

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
×