Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speaking and audio
Message
 
À
21/12/2006 09:04:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01179442
Message ID:
01179591
Vues:
9
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)
*delay - song starts to play
Declare Sleep in win32API integer nMilli


	loSpeak = CREATEOBJECT("SAPI.SPVoice")
	IF mgender = 0 && try again
		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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform