HotKeySet('^t', '_Translate')
$oSp = ObjCreate("SAPI.SpVoice")
While 1
Sleep(200)
WEnd
Func _Translate()
$oldClip = ClipGet(); get the data that is currently in the clipboard
Send('^c'); copy the selected text to the clipboard
$phrase = ClipGet(); get the data from the clipboard (which is now the selected word)
ClipPut($oldClip); put the old data back in the clipboard
ToolTip($phrase, 0, 0)
; now phrase is the word or phrase you want to translate
$oSp.Speak($phrase)
EndFuncI started to use SAPI.VOICE. My code mean, when i select anytext in anyApplication and press Ctrl+T he will speak my selected text. My problem is: when i selected a long text and press Ctrl+T he speak a long sentencese, when he's speaking, i continue to select other text, and press Ctrl+T again, but he not stop the speaking sentence. He must finish the speaking sentence then speak my second sentence. I don't know how to stop the speaking sentence and start to speak my new sentence. Please help me, hope to see your godlike answer!