Sign in to follow this  
Followers 0
scriptstopper

Set IVR command string, then have the script send the numbers

5 posts in this topic

Hi,

Thank you to the people who contributed (or just wished me well!) on the script in the signature below.

Now, I have a new question, really it's an old question but was left waaay on the back-burner until the more important functions were worked out.

If

$IVRNumber = 123444

or

$IVRNumber = "123444"

How is autoit set-up to use one number at a time, sequentially, when sending the ($IVRNumber) conference access code commands? It seems like an array which gets fed to a function.

Thanks.


don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Share this post


Link to post
Share on other sites



StringSplit(), then a For/Next loop to send the parts. See help file.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Remarks

If you use a blank string "" for the delimiters, each character will be returned as an element.

Going on the example:

$days = StringSplit("12323", "")

$days[1] contains "1"

$days[2] contains "2"

$days[3] contains "3"

$days[4] contains "2"

$days[5] contains "3"

Whaddya think?


don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$IVRConferenceNumber = "12323776#"
$IVRAdditionalCommands = 1

IVRSend() 

Func IVRSend()
;// Wait then send DTMF tones for use with interactive voice response (IVR) applications:
    MsgBox(0,"TEST!","now we display the values of the IVR conference number commands..",5)
    MsgBox(0,"TEST!","$IVRConferenceNumber is set to " & $IVRConferenceNumber,5)
    $aICN = StringSplit($IVRConferenceNumber,"")
    MsgBox(0,"TEST!","now we display the separate values of the IVR conference number access code",5)
    MsgBox(0,"TEST!","The number of numbers in $IVRConferenceNumber is " & $aICN[0],5)
    For $i = 1 to $aICN[0]
        MsgBox(0,"TEST!","$aICN[" & $i & "] is " & $aICN[$i],2) ; 
        Sleep(250)
    Next
    ; On some conferencing systems, it says "this call is being recorded, if you agree press '1'":
    MsgBox(0,"TEST!","Test for optional $IVRAdditionalCommands","",5)
    ; $IVRAdditionalCommands
    If $IVRAdditionalCommands = -1 Then 
        MsgBox(0,"TEST!","NO, no additional IVR commands, $IVRAdditionalCommands value is " & $IVRAdditionalCommands,5)
    ElseIf $IVRAdditionalCommands <> -1 Then
        ; "Press 1 to agree with the call recording"
        MsgBox(0,"TEST!","YES, dialing additional IVR commands. $IVRAdditionalCommands are " & $IVRAdditionalCommands,5)
        $aIAC = StringSplit($IVRAdditionalCommands,"")
        For $i = 1 to $aIAC[0]
            MsgBox(0,"TEST!","$aIAC[" & $i & "] is " & $aIAC[$i],5)
            Sleep(250)
        Next
    EndIf
    MsgBox(0,"TEST!","Entire IVR would be entered by now.",5)
EndFunc

Edited by scriptstopper

don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Share this post


Link to post
Share on other sites

Looks like you got the idea.

One hint though: Don't you find all those debug MsgBox()'s annoying?

I prefer to debug/test with ConsoleWrite() because I do it in the SciTE console as much as possible.

Otherwise, you might want to look into logging to a file, like with _FileWriteLog(), or look at the _DebugReport() example in the help file.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0