Problem with consecutive instructions

merlino

New Member
Licensed User
Longtime User
Sub Process_Globals

Dim vibra As PhoneVibrate
Dim parla As TTS


End Sub

Sub Service_Create
Dim SI As SmsInterceptor
SI.Initialize2("SI",999)
parla.Initialize("parla")

Service.StartForeground(1,notif)

End Sub

Sub SI_MessageReceived (From As String, Body As String) As Boolean


Select Body

Case "Warning"
vibra.Vibrate(5000)
vibra.Vibrate(2000)
parla.SetLanguage("en","EN")
parla.Speak("Attention 1",True)
ToastMessageShow("Attention",False)
parla.Speak("Attention 2",True)

........
Case Else
return False
...
return True
End Select
--------------------------

vibra.Vibrate(5000) works but vibra.vibrate(2000) not works. Same parla.Speak("Attention 1",True) Works but parla.Speak("Attention 2",True) not works............Why ?

I also tried

for i=1 to 2
vibra.Vibrate(2000)
Next

But Works only for 2000msec
 

sorex

Expert
Licensed User
Longtime User
for the speech you can use FALSE intead of TRUE.

which means it won't start before the current speech is done or interrups a running speech.
 
Upvote 0
Top