Cetin,
Actually I made a mistake in my last post. It isn't the speaking that repeats, it
is the playing of the wave file that repeats. In this case the wave
file linked to beep. chr(7). And it only repeats if the BkSp key is pressed.
I would like to prevent that from happening.
This is what is getting repeated:
Set Bell to "c:\d\math\huki.wav"
?? Chr(7)
Here is the code:
PARAMETERS talkit
declare long ShellExecute in "shell32.dll" ;
long hwnd, string lpszOp, ;
string lpszFile, string lpszParams, ;
string lpszDir, long nShowCmd
ShellExecute(0,'Open','c:\mp3\SomeSong.mp3','','',0)
Declare Sleep in win32API integer nMilli
loSpeak = CREATEOBJECT("SAPI.SPVoice")
IF mgender = 0
Set Bell to "c:\d\math\piano.wav"
?? Chr(7)
Sleep(2000)
loSpeak.Voice = loSpeak.GetVoices("gender=female").Item(0)
endif
IF mgender = 1
Set Bell to "c:\d\math\huki.wav"
?? Chr(7)
Sleep(5500)
loSpeak.Voice = loSpeak.GetVoices("gender=male").Item(0)
endif
loSpeak.SPEAK(talkit)
RETURN .t.