直接将下面的代码保存为test.vbs双击运行就可,如果不能使用,请看自己的电脑是否vbs被禁用。
复制代码 代码如下:
strURL = InputBox("请输入要读的网址", "朗读网页", "https://www.jb51.net/index.htm")
If strURL = "" Then
Wscript.quit
End If
Set ie = WScript.CreateObject("InternetExplorer.Application")
ie.visible = True
ie.navigate strURL
Do
Wscript.Sleep 200
Loop Until ie.ReadyState = 4
strContent = ie.document.body.innerText
Set objVoice = CreateObject("SAPI.SpVoice")
Set objVoice.Voice = objVoice.GetVoices("Name=Microsoft Simplified Chinese").Item(0)
objVoice.Rate = 5 '速度:-10,10 0
objVoice.Volume = 100 '声音:0,100 100
objVoice.Speak strContent
复制代码 代码如下:
strURL = InputBox("请输入要读的网址", "朗读网页", "https://www.jb51.net/index.htm")
If strURL = "" Then
Wscript.quit
End If
Set ie = WScript.CreateObject("InternetExplorer.Application")
ie.visible = True
ie.navigate strURL
Do
Wscript.Sleep 200
Loop Until ie.ReadyState = 4
strContent = ie.document.body.innerText
Set objVoice = CreateObject("SAPI.SpVoice")
Set objVoice.Voice = objVoice.GetVoices("Name=Microsoft Simplified Chinese").Item(0)
objVoice.Rate = 5 '速度:-10,10 0
objVoice.Volume = 100 '声音:0,100 100
objVoice.Speak strContent
标签:
VBS,读网页
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“VBS读网页的代码”评论...