1.21.2012

Created a 'SAY' command using AutoIt

Refreshing my Perl knowledge. Wanted to copy/paste examples and make them self-documenting (audio wise). Thought pre-pending text with 'SAY' and using this AutoIt script would work:

Dim $oSPV,$i,$msg,$speak_msg
$oSPV=ObjCreate("SAPI.spVoice")
For $i=1 to $cmdline[0]
$msg=$msg & ' ' & $cmdline[$i]
Next
$speak_msg=$msg
$speak_msg=stringreplace($speak_msg,'#',' ')
$speak_msg=stringreplace($speak_msg,'#',' ')
ConsoleWrite('REM ' & $msg & @lf)
$oSPV.Speak($speak_msg)

say.au3
say.exe

No comments:

Post a Comment