how to wait the time of speak?

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

how to wait the time of speak?

Postby alexhaifa » May 14th, 2009, 2:17 pm

Hello,

First of all I want to congratulate for the wonderful component named Office assistant.

I need a help how to make the code wait until the text dissapear, let me explain better:
As you can see in my code below, when I display the text/msg to user, I pass 3000 or 5000 as time,
but my code go on even when I have still my assistent displaying the message on the screen. I'd like my
code could go on after displaying the message. Is there any way to do this? Is there any option in component
to make the code wait until the message fulfill the time that I passed to go on?

Thanks

If RespCerta=RespDigit Then Begin
Helper.Play([aaCongratulate]);
Helper.Play(aaSpeak);
Helper.Speak('Parabéns! Você acertou a resposta!',3000);
OcultaHelper.Interval := 3000;
HelperGravaResposta(True, 3, CodQ);
GravaGraficoHelper(3,1,CodQ);
End Else Begin
MSG := Format(MSG,[RespCerta]);
Helper.Play(aaSad);
Helper.Play(aaSpeak);
Helper.Speak(MSG,5000);

Helper.wa
OcultaHelper.Interval := 5000;
HelperGravaResposta(False, 3, CodQ);
GravaGraficoHelper(3,0,CodQ);
End;
Finally
alexhaifa
Junior Member
Junior Member
 
Posts: 35
Joined: November 22nd, 2005, 2:01 pm
Location: Brazil

Re: how to wait the time of speak?

Postby Kambiz » May 15th, 2009, 3:44 pm

Here is the simple (maybe not the best) way to wait for speak balloon to be disappeared.

Code: Select all
Assistant1.Speak('Hello World!', 2000);
while Assistant1.VisibleBalloon = bkSpeak do
  Application.ProcessMessages;
ShowMessage('Balloon Closed');
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron