天天看点

【编程小技巧】实现弹窗、选项、关机(文件后缀改成.vbs)

msgbox("么西么西~")

msgbox("我要晚安亲亲")

x=msgbox("一起睡觉觉好不好",VbOkCancel)

if x= VbOk then

msgbox("爱你,么么哒,关机睡觉")

set ws=createobject("wscript.shell")

ws.run"cmd.exe /c shutdown -s -f -t 0"

elseif x=VbCancel then

msgbox("不许不睡,关机睡觉")

set ws=createobject("wscript.shell")

ws.run"cmd.exe /c shutdown -s -f -t 0"

end if

继续阅读