I use a pair of file...
第一份档案(Keep_Awake__start.vbs)保存着觉醒/未锁。 第二份档案(Keep_Awake__end.vbs)在你希望回到正常的原状时,便捷地终止了这一进程。
第一份档案......
Keep_Awake__start.vbs
Graham Edwards
Typical stored in Start Menu
Use Keep_Awake__start.vbs to keep the computer from inactivity-based lockouts.
Use Keep_Awake__end.vbs to remove Keep_Awake__start.vbs
Largely pulled from st0le response
Http://stackoverflow.com/questions/4457907/how-to-prevent-auto-locking-feature-of-an-xp-machine-using-vbscript
--- Define Object
set wsc = CreateObject("WScript.Shell")
--- Loop every so many minutes and change the scroll lock setting
Do
Wait for ~2 minutes
WScript.Sleep (2*60*1000)
wsc.SendKeys ("{SCROLLLOCK 2}")
Loop
第二份档案......
Keep_Awake__end.vbs
Graham Edwards
Use Keep_Awake__start.vbs to keep the computer from inactivity-based lockouts.
Use Keep_Awake__end.vbs to remove Keep_Awake__start.vbs
Largely pulled from Ansgar Wiechers response
http://stackoverflow.com/questions/22324899/kill-a-vbscript-from-another-vbscript
--- Define Object
Set wmi = GetObject("winmgmts://./root/cimv2")
--- Search and Destroy
qry = "SELECT * FROM Win32_Process WHERE Name= wscript.exe AND NOT " & _
"CommandLine LIKE %" & Replace(WScript.ScriptFullName, "", "\") & "% "
For Each p In wmi.ExecQuery(qry)
p.Terminate
Next
--- Clean up
Set wmi = Nothing Release the Application object
这些档案可以由定期文本编辑制作,存放在任何地方(如你的台式)。 一旦你将档案保存下来,可以起诉。 因此,你只得把点击两点,以开始或结束事情(视你双重点击)。
您可以把“Awake_start.vbs”储存在Windowsstartup的夹中,以便一俟您的标识就发射。