Script2EXE Home How to Use Interface Buy Support Site Home

Text to Speech - A Sample Programm Created with Script2EXE


Source Codes
<HTML>
<HEAD>
<TITLE>Text to Speech</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
function about()
{
if(window.external.SHW)
{
var msg="This program is created with Script2EXE by XueBrothers.\r\n\r\nWith Script2EXE, you can easily convert JavaScript, VBScript, HTML to independent Win32 programms and ActiveX DLLs.\r\n\r\nWould you like to visit the Web site?";
var r=window.external.MessageBox(msg, "yesno", "information", "Text to Speech");
if(r=="yes")
    window.external.ShellExecute("http://www.xuebrothers.net/sh/sh.htm");
}
}

function spk()
{
try
{
dv.Speak(text.value);
}
catch(e)
{
alert(e.description);
}
}
</SCRIPT>
<BODY scroll="no" style="margin:0" bgColor="BUTTONFACE">
<object NAME="dv" TYPE="application/x-oleobject"  classid="clsid:2398E32F-5C6E-11D1-8C65-0060081841DE"  HEIGHT=0  WIDTH=0 style="visibility:hidden"></object>


<table width="100%" height="100%">
<tr>
<td width="100%"><textarea style="width:100%;height:100%" id="text">Text to Speech</textarea></td>
</tr>
<tr>
<td align="right" height="32"><input type="button" value="About..." onclick="about()" style="width:70"> <input type="button" value="Speak" onclick="spk();" style="width:70"></td>
</tr>
</table>
</BODY>
</HTML>