一、电脑说话
效果
电脑说出:“打开我的人是猪”(内容可改)。
代码
set objTTS = createobject("sapi.spvoice")
objTTS.speak "打开我的人是猪"
二、不说“我是猪”就关机
效果
如题目,说的东东可改。
代码
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 180 -c ""说我是猪,不说我是猪一分钟后就关机"" ",0 ,true
dim a
do while(a <> "我是猪")
a = inputbox ("说我是猪,就不关机,说 ""我是猪"" ","说不说","不说",8000,7000)
loop
msgbox "早说就行了嘛"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "哈哈哈哈,好乖"
三、爱情测试
效果
输入喜欢的人,是“张三”(字符串可改)就停止程序,否则无限次执行程序。
代码
const title = "爱情测试"
const yourname = "张三"
const question = "你最喜欢的人是谁?请在下面的方框中输入他(她)的名字。"
const info = "你在说谎!不要逃避,实话实说。"
const scend = "你说出了你的心扉,那就向他(她)表白吧。"
dim youranswer
do
youranswer = inputbox(question, title)
if youranswer <> yourname then msgbox info, vbinformation+vbokonly, title
loop until youranswer = yourname
msgbox scend, vbinformation+vbokonly, title
四、微信无限发送
效果
如题目,内容什么格式都可以(文字,图片,视频这些的)。
接收者可改,内容要copy。
代码
set wshshell=wscript.createobject("wscript.shell")
wshshell.AppActivate"接收者"
for i = 1 to 100
wscript.sleep 100
wshshell.sendKeys "^v"
wshshell.sendKeys "%s"
next