足球游戏_中国足彩网¥体育资讯$

hta实现的定时关机小程序
来源:易贤网 阅读:1060 次 日期:2016-06-24 10:14:29
温馨提示:易贤网小编为您整理了“hta实现的定时关机小程序”,方便广大网友查阅!

定时关机小程序

界面:

代码如下:

<head>

<title>定时关机小程序</title>

<hta:application

     applicationname=hta test

  borde=thin

  borderstyle=raised

  icon=c:\windows\system32\control.exe

     scroll=no

     singleinstance=yes

  maximizebutton=no

  minimizebutton=no

     windowstate=normal

>

</head>

<script language=vbscript>

 sub window_onload

  strcomputer = .

  set objwmiservice = getobject(winmgmts:\\ & strcomputer & \root\cimv2)

  set colitems = objwmiservice.execquery(select * from win32_desktopmonitor)

  for each objitem in colitems

   inthorizontal = objitem.screenwidth

   intvertical = objitem.screenheight

  next

  intleft = (inthorizontal - 240) / 2

  inttop = (intvertical - 500) / 2

  window.resizeto 240,500

  window.moveto intleft, inttop

 end sub

    sub onesub

  set objectshell=createobject(wscript.shell)

  ireturn = objectshell.run(shutdown -s -f -t 1800, 0, true)

    end sub

    sub twosub

  set objectshell=createobject(wscript.shell)

  ireturn = objectshell.run(shutdown -s -f -t 2700, 0, true)

    end sub

    sub thrsub

  set objectshell=createobject(wscript.shell)

  ireturn = objectshell.run(shutdown -s -f -t 3600, 0, true)

    end sub

 sub ok

  if isnumeric(text.value) then

   overtime = text.value * 60

   set objectshell=createobject(wscript.shell)

   ireturn = objectshell.run(shutdown -s -f -t & overtime, 0, true)

  else

   msgbox 请输入一个有效的数字。

  end if

    end sub

    sub shutdown

  set objectshell=createobject(wscript.shell)

  ireturn = objectshell.run(shutdown -s -t 0, 0, true)

    end sub

    sub eshutdown

  set objectshell=createobject(wscript.shell)

  ireturn = objectshell.run(shutdown -a, 0, true)

    end sub

</script>

<body>

<br>

<center><div><input type=button style=height:30px;line-height:20px;border:1px solid #aaa; value=30 分钟后关闭计算机 name=run_button onclick=onesub><p> </div></center>

<center><div><input type=button style=height:30px;line-height:20px;border:1px solid #aaa; value=45 分钟后关闭计算机 name=run_button onclick=twosub><p> </div></center>

<center><div><input type=button style=height:30px;line-height:20px;border:1px solid #aaa; value=60 分钟后关闭计算机 name=run_button onclick=thrsub><p> </div></center>

<br>

 自定义时间(分钟):<p>

 <input type=text name=text id=text style=height:23px;width:120px;line-height:20px;border:1px solid #aaa;/> 

<input name=submit type=submit style=width:50px;height:23px;line-height:20px;border:1px solid #aaa; value=确定 onclick=ok><p>

<br>

<center><div><input type=button style=height:30px;line-height:20px;border:1px solid #aaa; value=取消计划中的注销 name=run_button  onclick=eshutdown><p> </div></center>

<center><div><input type=button style=height:30px;line-height:20px;border:1px solid #aaa; value= 关闭计算机 name=run_button  onclick=shutdown><p> </div></center>

<br>

<center><div><a href=http://www.enun.net/>http://www.enun.net/</a></div></center>

</body>

中国足彩网信息请查看脚本栏目
易贤网手机网站地址:hta实现的定时关机小程序
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标