我想编写一个vbs整人代码来表白,谁能帮我一下
发布网友
发布时间:2022-04-28 16:24
我来回答
共5个回答
热心网友
时间:2022-06-19 16:57
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)
if( a <> "我愿意" ) then
msgbox “不愿意么?再考虑一下哦"
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "哈哈哈哈,好乖"
里面的汉字自己改成合适的。
如果对方不愿意,真的会被关机哦,请谨慎使用。
热心网友
时间:2022-06-19 16:57
下边代码才是完成版,2楼有语法错误
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)
if ( a <> "我愿意" ) then
msgbox "不愿意么?再考虑一下哦"
end if
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "哈哈哈哈,好乖"
热心网友
时间:2022-06-19 16:58
菜鸟改了两个小时,如下
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)
if ( a <> "愿意" ) then
msgbox "不愿意么?再考虑一下哦"
end if
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "嘿嘿嘿"
msgbox "叫我老公"
msgbox "快点"
dim b
do while (a <> "老公")
a = inputbox ("叫吧","叫的你就是我老婆了","",8000,7000)
if ( a <> "老公" ) then
msgbox "不愿意叫吗?再考虑一下哦"
end if
loop
msgbox "老婆~"
msgbox "mua~"
msgbox "爱你"
msgbox "嘿嘿"
文字都可随便替换,同时msgbox为弹窗,是可以增加,删除的
热心网友
时间:2022-06-19 16:59
第九行,前引号改成英文版
然后在loop上加end if,保存运行即可
热心网友
时间:2022-06-19 16:59
dim a,b '
const pass="我爱你" '
do
a=inputbox("快说 我爱你")
if a=pass then
msgbox "嗯我也爱你"
exit do
else
msgbox "嗯哼?"
msgbox "那我就包养你"
msgbox "让你洗衣服"
msgbox "做饭"
msgbox "扫地"
msgbox "一切家务你全包了"
msgbox "保大"
msgbox "你再考虑考虑"
end if
loop
const ily="521" '
do
msgbox "就这样被你征服"
msgbox "切断了所有退路"
msgbox "我的心情是坚固"
msgbox "我的决定是糊涂"
msgbox "就这样被你征服"
msgbox "喝下你藏好的毒"
msgbox "我的剧情已落幕"
msgbox "我的爱恨已入土"
msgbox "终于我明白俩人要的"
msgbox "是一个结束"
msgbox "所有的辩解"
msgbox "都让对方以为是企图"
msgbox "放一把火烧掉"
msgbox "你送我的礼物"
msgbox "却浇不熄我胸口"
msgbox "灼热的愤怒"
msgbox "亲爱的你以为这就完了?"
b=inputbox("刚才的歌词中有几个征服 劳动节节日的两个数字中间加征服出现的次数")
if b=ily then
msgbox "亲爱的我们婚礼见"
exit do
else
msgbox "再想想哦"
end if
loop
rem 更改VBS的图标你应该会吧 不会的话追问
rem zzl zz