Skip to content

Instantly share code, notes, and snippets.

@sudot
Created September 2, 2019 03:45
Show Gist options
  • Save sudot/d8f0f5e546ee2fce4345e55bfbdc2f34 to your computer and use it in GitHub Desktop.
Save sudot/d8f0f5e546ee2fce4345e55bfbdc2f34 to your computer and use it in GitHub Desktop.
电脑不锁屏
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>I need you still work!</title>
</head>
<body bgcolor="#215E21">
<script type="text/javascript">
function PressKey(){
var objWs = new ActiveXObject("Wscript.Shell");
objWs.SendKeys("{SCROLLLOCK}");
}
PressKey(); // 立即执行就立刻弹出第二次确认框,无需多等待
setInterval("PressKey()",10000); // 按下按键的间隔时间。
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment