标题: 开玩笑小程序 [打印本页]

作者: 51hei丽人    时间: 2016-6-21 01:20
标题: 开玩笑小程序
这儿有一些“开玩笑”小程序。
代码是我自己写的。如要转载,可不注明出处。
废话不多说,开始啦
第一个:
on error resume next
const pmm="密码你自己设定"
dim ab
ab=false
ppo=MsgBox ("接下来,请在444秒内连续按“确定”一千次,否则,你的电脑会关机……",VbInformation+vbyesno)
if ppo=vbNo then
    mm=inputbox("输入密码,就可取消","pass","密码")
    if mm=pmm then
        msgbox "正确"
        ab=true
    end if
else
    msgbox "密码错误!"
end if
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 444 -c ""请在剩下的秒内连续按“确定”一千次,否则就会关机。嘿嘿!"" ",0 ,true
Dim a
a = 0
Do While a < 1000
    if ab=true then
        dim WSHshell
        set WSHshell = wscript.createobject("wscript.shell")
        WSHshell.run "cmd.exe /c shutdown -a",0 ,true
        exit do
    end if
    a = a + 1
    b = 1000-a
    MsgBox "第" & a & "次,加油,还有"& b &"次",vbApplicationModa+VbMsgBoxSetFore+vbSystemModal,"加油"
Loop
msgbox "恭喜你成功了!"
'===============================到此为止(这行不要)========================
把以上代码写到记事本里,然后保存为VBS的扩展名(*.vbs)
效果你最好别自己试,否则……你的手说不定抽筋呢……

第二个:
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""说我是猪,不说“我是猪”就会关机,不信……试下。"" ",0 ,true  
dim a
do while(a <> "我是猪")
a = inputbox ("说我是猪,就可以不关机,快点,说 ""我是猪"" ","好好考虑吧……","你才是",8000,7000)
if a="你才是"then
  if df<>"yes" then
   dim df
   df="yes"
   msgbox "敢骂我,你再骂一次试看看!",vbApplicationModa+VbMsgBoxSetFore+vbSystemModal
  else
   msgbox "好哇,天堂有路你不走,关机无门你偏来,关机吧~~~",vbApplicationModa+VbMsgBoxSetFore+vbSystemModal
   set WSHshell = wscript.createobject("wscript.shell")
   WSHshell.run "cmd.exe /c shutdown -a",0 ,true  
   WSHshellA.run "cmd.exe /c shutdown -r -t 0 -c ""说我是猪,不说“我是猪”就会关机,不信……试下。"" ",0 ,true  
  end if
end if
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true  
msgbox chr(13) + "早说不就行了嘛",vbApplicationModa+VbMsgBoxSetFore+vbSystemModal
msgbox chr(13) + "哈哈哈哈,人才,人才呀",vbApplicationModa+VbMsgBoxSetFore+vbSystemModal
'===============================到此为止(这行不要)========================
一样的,保存扩展名为“vbs”(*.vbs)

第三个,是相当于钥匙,运行后能停止关机倒计时:
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "成功解除!",VbInformation,"信息"
'===============================到此为止(这行不要)========================
好了,文章结束,大家记住啊,玩笑可别开的过火了啊





作者: xiaoxiaoza555    时间: 2016-11-10 19:01
保存成*.vbs就可以运行了吗?





欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1