me explicarias como se disparan los eventos al utilizar
- Code: Select all Expand view RUN
- oSpVoice:__hSink := __axRegisterHandler( oSpVoice:__hObj, { | a, b, c, d, e | OnEvent( a, b, c, d, e ) } )
al hacer Play en el form
- Code: Select all Expand view RUN
- DEFINE BUTTON oBtnPlay
ROW 160
COL 460
WIDTH 90
HEIGHT 28
ACTION( oSpVoice:Speak( cTextToRead, ( SVSFlagsAsync + SVSFPurgeBeforeSpeak ) ) )
- Code: Select all Expand view RUN
- FUNCTION OnEvent()
LOCAL iMax := PCOUNT()
LOCAL i
LOCAL aPara := ARRAY( 5 )
FOR i := 1 TO iMax
aPara[ i ] := PValue( i )
NEXT
DO CASE
CASE aPara[ 1 ] = 2
oSpVoice_Word( aPara[ 2 ], aPara[ 3 ], 0, 0 )
CASE aPara[ 1 ] = 5
oSpVoice_Word( aPara[ 2 ], aPara[ 3 ], aPara[ 4 ], aPara[ 5 ] )
ENDCASE
RETURN NIL
- Code: Select all Expand view RUN
- PROCEDURE oSpVoice_Word( StreamNumber, StreamPosition, CharacterPosition, Length )
// In order to show this selection,
// the Text1.HideSelection property must be False!
SetProperty( "SPEAK", "oGetText", "HideSelection", .F. )
SetProperty( "SPEAK", "oGetText", "SelectRange", { CharacterPosition, CharacterPosition + Length } )
Domethod( "SPEAK", "oGetText", "SetFocus" )
// Domethod("SPEAK","oGetText","ScrolltoCaret")
DO EVENTS
RETURN