• 목록
  • 아래로
  • 위로
  • 0
  • 임꺽
  • 조회 수 2272

'****************************************************************************************
'숫자음성서비스, 10000까지만 가능합니다.
'****************************************************************************************
Sub do_Sound_Number()
 
'플래그On
SetTagVal "SYS.FLAG",1
 
'현재숫자값읽기
SNo# = GetTagVal ("SOUND.AIO.D001")
 
'0처리
If Sno# = 0 Then PlaySound  ("00") : Exit Sub
'10000처리
If Sno# = 10000 Then PlaySound  ("10000") : Exit Sub
 
'숫자의문자화
Source$ = Format(Sno#,"000#")
 
'1000단위
S$ = Left$ (Source$,1)
If S$ <> "0" Then
 If S$ = "1" Then PlaySound ("1000")
 If S$ = "2" Then PlaySound ("2000")
 If S$ = "3" Then PlaySound ("3000")
 If S$ = "4" Then PlaySound ("4000")
 If S$ = "5" Then PlaySound ("5000")
 If S$ = "6" Then PlaySound ("6000")
 If S$ = "7" Then PlaySound ("7000")
 If S$ = "8" Then PlaySound ("8000")
 If S$ = "9" Then PlaySound ("9000")
End If
 
'100단위
S$ = Mid$ (Source$,2,1)
If S$ <> "0" Then
 If S$ = "1" Then PlaySound ("100")
 If S$ = "2" Then PlaySound ("200")
 If S$ = "3" Then PlaySound ("300")
 If S$ = "4" Then PlaySound ("400")
 If S$ = "5" Then PlaySound ("500")
 If S$ = "6" Then PlaySound ("600")
 If S$ = "7" Then PlaySound ("700")
 If S$ = "8" Then PlaySound ("800")
 If S$ = "9" Then PlaySound ("900")
End If
 
'10단위
S$ = Mid$ (Source$,3,1)
If S$ <> "0" Then
 If S$ = "1" Then PlaySound ("10")
 If S$ = "2" Then PlaySound ("20")
 If S$ = "3" Then PlaySound ("30")
 If S$ = "4" Then PlaySound ("40")
 If S$ = "5" Then PlaySound ("50")
 If S$ = "6" Then PlaySound ("60")
 If S$ = "7" Then PlaySound ("70")
 If S$ = "8" Then PlaySound ("80")
 If S$ = "9" Then PlaySound ("90")
End If
 
'1단위
S$ = Right$ (Source$,1)
If S$ <> "0" Then
 If S$ = "1" Then PlaySound ("01")
 If S$ = "2" Then PlaySound ("02")
 If S$ = "3" Then PlaySound ("03")
 If S$ = "4" Then PlaySound ("04")
 If S$ = "5" Then PlaySound ("05")
 If S$ = "6" Then PlaySound ("06")
 If S$ = "7" Then PlaySound ("07")
 If S$ = "8" Then PlaySound ("08")
 If S$ = "9" Then PlaySound ("09")
End If
 
'음성처리완료시간
Sleep (1200)
 
'플래그Off
SetTagVal "SYS.FLAG",0

End Sub
 

공유

facebooktwitterpinterestbandkakao story
퍼머링크

댓글 0

권한이 없습니다.