Non-blocking wait until revIsSpeaking() is FALSE
Posted: Fri Jul 10, 2015 12:47 am
Hello Forum,
My latest challenge...
I'm trying to get a field to speak, which is easy, and get it to automatically perform other functions as soon as it finishes speaking, also pretty easy. The problem is in figuring out how to do these thing in a non-blocking manner so that the user can stop the speech before it reaches the end.
Here's an example of one of the many scripts I've been using, but which has the disadvantage of forcing one to listen until the speaking is done:
Is there a way of writing this script so that revStopSpeech can be activated at any time during revSpeak? Looking around this forum at some related but different topics, I see advice on using "wait with messages," which seems like it might be a solution, but I've never used that before and am not quite sure how to get that to work with this script.
As always, any suggestions would be greatly appreciated.
All the best,
deeverd
My latest challenge...
I'm trying to get a field to speak, which is easy, and get it to automatically perform other functions as soon as it finishes speaking, also pretty easy. The problem is in figuring out how to do these thing in a non-blocking manner so that the user can stop the speech before it reaches the end.
Here's an example of one of the many scripts I've been using, but which has the disadvantage of forcing one to listen until the speaking is done:
Code: Select all
revSpeak line 1 to -1 of field "audioField"
wait until revIsSpeaking() is TRUE-- Seems I must do this first, since revIsSpeaking is false at first
wait until revIsSpeaking() is FALSE
send "mouseUp" to button "audioQuietButton"
As always, any suggestions would be greatly appreciated.
All the best,
deeverd