人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動態(tài)

hta實現(xiàn)的定時重啟或關閉計算機的小工具

發(fā)布日期:2021-12-22 15:24 | 文章來源:站長之家
<!--
/*-------------------------------------------------------------------------------
Description:一個用于定時重啟或關閉計算機的小工具,適用于Windows2K/XP/2003
Author:十一狼
Email:112183883@163.com
QQ:112183883
WebSite:http://www.w3cg.net/
-------------------------------------------------------------------------------*/
-->
<html>
<head>
<title>♀Windows系統(tǒng)計時器♀</title>
<metahttp-equiv="content-type"content="text/html;charset=gb2312">
<hta:application
id="WTimer"
maximizebutton="No"
minimizebutton="Yes"
singleinstance="Yes"
contextmenu="Yes"
sysmenu="Yes"
version="1.0"
innerborder="No"
caption="Yes"
showintaskbar="Yes"
border="Normal"
borderstyle="Normal"
applicationname="WindowsTimer"
icon="TimerIco.ico"
/>
<Styletype="text/css">
<!--
*{font-family:CourierNew,Arial,Sans-serif;font-size:9pt;}
body{overflow-y:hidden;}
diva:link,diva:visited{text-decoration:none;color:#000}
diva:hover{text-decoration:underline;color:#f00}
#footerinfo{width:100%;display:table;margin-top:5px;}
#left{float:left;width:70%;}
#right{float:right;width:29%;text-align:right;margin-right:1px;}
-->
</Style>
<ScriptLanguage="JavaScript">
<!--
$bl_Sleep=false;
functiongetObject($obj){
return(document.getElementById($obj));
}
String.prototype.parseInt=function(){
return(parseInt(this));
}
functiongetRadioVal($name){
$oEms=document.getElementsByName($name);
for($i=0;$i<$oEms.length;$i++){
if($oEms[$i].checked){return($oEms[$i].value);}
}
}
functionisDeclared($varName){
return(typeof($varName)!="undefined");
}
functionchStatus($name,$status){
$ooEms=document.getElementsByName($name);
for($a=0;$a<$ooEms.length;$a++){
$ooEms[$a].disabled=$status;
}
}
functionwindow.onload(){
$sWidth=window.screen.width;
$sHeight=window.screen.height;
$aWidth=400;
$aHeight=185;
window.resizeTo($aWidth,$aHeight);
window.moveTo(($sWidth-$aWidth)/2,($sHeight-$aHeight)/2);
document.bgColor="#d4d0c8";
getObject("StopButton").disabled=true;
getObject("left").innerHTML="提示:請選擇您想要使用的功能!";
}
functionTimer_Quit(){
window.close();
}
functionTimer_Kernel(){
if($bl_Sleep){
if(isDeclared($time)&&isDeclared($mod_time)&&isDeclared($operation)){
if($time>0){
$Oper_str="";
$Hint_str="";
$Titl_str="";
if($operation=="rWin"){
$Oper_str="<spanstyle=\"color:red\">提示:系統(tǒng)計時重啟功能已啟用,請注意保存!</span>";
}
else{
$Oper_str="<spanstyle=\"color:red\">提示:系統(tǒng)計時關閉功能已啟用,請注意保存!</span>";
}
if($mod_time=="mod_minute"){
$tMinute=($time/60).toString().parseInt();
$tSecond=$time%60;
if($tMinute!=0){
if($tSecond<10){
$tSecond="0"+$tSecond;
}
$Titl_str="剩余時間:"+$tMinute+"分"+$tSecond+"秒";
}
else{
$Titl_str="剩余時間:"+$tSecond+"秒";
}
}
else{
$Titl_str="剩余時間:"+$time+"秒";
}
getObject("left").innerHTML=$Oper_str;
document.title=$Titl_str;
$time=$time-1;
$o=setTimeout("Timer_Kernel()",1000);
}
else{
$Flag="";
if($operation=="rWin"){
$Flag=6;//6為重啟操作系統(tǒng)
}
else{
$Flag=1;//1為關閉操作系統(tǒng)
}
OperateWin32($Flag);
getObject("left").innerHTML="<spanstyle=\"color:red\">提示:正在執(zhí)行預定操作!</span>";
document.title="正在執(zhí)行預定操作";
}
}
}
}
functionTimer_Stop(){
$bl_Sleep=false;
if(isDeclared($o)){clearTimeout($o);}
getObject("time").disabled=false;
getObject("mod_time").disabled=false;
chStatus("operation",false);
getObject("StartButton").disabled=false;
getObject("StopButton").disabled=true;
getObject("left").innerHTML="提示:請選擇您想要使用的功能!";
document.title="♀Windows系統(tǒng)計時器♀";
}
functionTimer_Start(){
$bl_Sleep=true;
$nowTime="";
$time=getObject("time").value;
$mod_time=getObject("mod_time").value;
$operation=getRadioVal("operation");
if(isNaN($time)||$time==""){
alert("請正確設定一個時間值!");
getObject("time").select();
return;
}
else{
$time=$time.parseInt();
if($mod_time=="mod_minute"){$time=$time*60;}
}
getObject("time").disabled=true;
getObject("mod_time").disabled=true;
chStatus("operation",true);
getObject("StartButton").disabled=true;
getObject("StopButton").disabled=false;
Timer_Kernel();
}
functionOperateWin32($DownFlag){
$OS_Pro=GetObject("WinMgmts:{(shutdown)}//./root/cimv2").ExecQuery("select*fromwin32_operatingsystemwhereprimary=true");
for($e=newEnumerator($OS_Pro);!$e.atEnd();$e.moveNext()){
$getProcess=$e.item()
$getProcess.win32shutdown($DownFlag);
}
}
functionResponseKeyPress(){
if(event.keyCode==13){event.keyCode=9;}
}
//-->
</Script>
</head>
<body>
<fieldset>
<tablewidth="100%"border="1"cellpadding="4"cellspacing="3">
<formname="form1">
<tr>
<tdwidth="25%">設定時間:</td>
<tdwidth="75%"><inputtype="text"name="time"size="20"value=""onkeypress="ResponseKeyPress()"/>
<selectname="mod_time">
<optionvalue="mod_minute">分鐘</option>
<optionvalue="mod_second">秒鐘</option>
</select>
</td>
</tr>
<tr>
<td>功能選擇:</td>
<td>
<inputtype="radio"name="operation"value="rWin"checked="checked"/>重啟
<inputtype="radio"name="operation"value="cWin"/>關機
</td>
</tr>
<tr>
<tdcolspan="2"style="text-align:right">
<inputtype="button"name="StartButton"value="應用"onclick="Timer_Start()"/>
<inputtype="button"name="StopButton"value="取消"onclick="Timer_Stop()"/>
<inputtype="button"name="ExitButton"value="退出"onclick="Timer_Quit()"/>
</td>
</tr>
</form>
</table>
</fieldset>
</body>
</html>
windowtimer.rar

版權聲明:本站文章來源標注為YINGSOO的內(nèi)容版權均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內(nèi)容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。

相關文章

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務

7x24全年不間斷在線

專屬顧問服務

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務熱線

關注
微信

關注官方微信
頂部