[futurebasic] Re:FB3 and speech

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Dabs@...
Date: Sat, 2 Oct 1999 11:46:55 EDT
The speek text FN that speeks up to a 256 byte string works but....this
use to work when speaking large amount of text from edit fields.  Now 
even when I convert the part the compiler complains about by converting   
([textHndl&]+StartChar%)   to a variable such as t& the spoken text sounds 
like garbage. Clear speech but not the text selected.  How should the variable
pointing to the text in the edit field be referenced. 

This is a simplified part of the FN where a edit field number EFNum is passed 
to the FN and the speech channel is previously built.

TeHndl& = TEHANDLE(EFNum)
StartChar% = TeHndl&..teSelStart%
EndChar% = TeHndl&..teSelEnd%
NumChar% = TeHndl&..teLength%
textHndl& = TeHndl&..teTextH&
hState = FN HGETSTATE(textHndl&)
OSErr = FN HLOCK(textHndl&)


OSErr = FN 
SpeakText(gSpeechChanPtr&,[textHndl&]+StartChar%,EndChar%-StartChar%)