方法: GatherDigits


功能:

 

在线路上收集按键

     

Parameters:

 

digitsCount:
收集按键的数量,一旦达到该书量,DigitsGathered 事件将被触发.

terminatDigit:
终止按键. 一旦检测到这个按键, DigitsGathered 事件将被触发.

ReGatherDigit:

重新开始收集按键,一旦检测到这个按键,收集过程重新开始.

CancelDigit:


取消按键.一旦检测到,收集过程将被取消.

SpecialDigits:


特殊按键. 比如SpecialDigits 是0, 如果0被收集到,收集过程将结束. 如果10被检测到, 收集过程不会结束. 可以使用多个特殊按键,每个按键之间用逗号隔开.

firstDigitTimeOut:
第一个按键超时时间. 一旦超时, DigitsGathered 事件将被触发.

 

interDigitTimeOut:
中间按键超时时间.一旦超时, DigitsGathered 事件将被触发.



TotalTimeOut:
总超时时间.一旦超时, DigitsGathered 事件将被触发.

     
     

Events Raised:

  DigitsGathered
     

Sample Code In Visual Basic:

'The following code shows how to begin gathering digits after a digit "1" has been detected

Sub VoiceAngel1_DigitDetected(LineIndex as integer ,sDigit as String )

  VoiceAngel1.CurrentLineIndex = LineIndex

  if sDigit="1" then

     VoiceAngel1.GatherDigits 4 ,"#","","","",6000,4000 ,50000

     VoiceAngel1.OpenWaveFile "Prompt.wav"

     VoiceAngel1.StartPlaying 0,false

    

  end if

End sub