|
以下是朋友发过来的一个文件“朋友必看.vbe”。公布出来仅供学习交流之用。 ( 特点:利用shutdown 加参数来实现 60秒后关机,弹出一文本输入框。判断。
//下面是源代码
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)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "知道自己很爱很崇拜很仰慕大哥了吧"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"
----------------------------------------------------------------
QZ分析:
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 <> "163.com")
a = inputbox ("提示的内容如QZ的网址","标题","输入文本内容",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"判断后对话框的标题"
loop
msgbox chr(13) + chr(13) + chr(13) + "输入的文字与预先设定的一致时出现的提示"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "取消关机,第二次出现的提示"
------------------------------------------------------------------------
以上分析系QZ对照实际,记载,学习交流之用。
|
|