C代码:
system("Wscript Debug\\test.vbs")vbs 文件内容
Dim vbs1'set vbs1 = WScript.CreateObject("WScript.Shell")
set vbs1 = WScript.CreateObject("SAPI.SpVoice")
'语言的 在 Win+R中 输入 sapi.cpl 那里有 如 Microsoft Lili 的显示
Set vbs1.Voice = vbs1.GetVoices("Name=Microsoft Lili").Item(0)
vbs1.Rate = 3 '速度-10,10
vbs1.Volume= 80 '音量 0,100
vbs1.Speak "wjshan0808"
Set wmp = CreateObject("WMPlayer.OCX")wmp.URL = "C:\WINDOWS\Media\Windows XP 惊叹号.wav"
Do Until wmp.playState = 1
WScript.Sleep 1000
Loop
msgbox "Hello!The computer will ring!" ,"48","inf"把这段保存为.vbs运行就可以了。
--------------------------分析-------------------------------------------
msgbox "内容","类别","标题"
第一个msbox为显示信息的代码
第二个为信息框的类别,64为提示,48为警告。具体可以问百度
第三个为信息框的标题