大家来分析一下这个脚本代码

来源:百度知道 编辑:UC知道 时间:2024/06/18 06:32:24
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 10 -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) + "哈哈哈哈,真过瘾"

一个无聊的关机程序,会弹出一个对话框:”说爷,不说爷就关你机,不信,试试···”然后10s倒计时,如果输入了“爷”,就会输出"早说就行了嘛" 并停止计时,之后输出“哈哈哈哈,真过瘾”,否则,即如果输入除了爷之外的字,都会继续计时,直到倒计时为0,然后关机=。=

希望解释能让你满意。。。我承认我解释的有可能不正确,但是作为一名pascal 的学习者,我觉得我是对的。。

希望能给最佳。。