如何使用笔记本电脑盖关闭的脚本?

时间:2015-01-11 17:10:50

标签: autohotkey

所以我有一个完美无缺的脚本。

这是:

#SingleInstance force
#Persistent
settimer, idleCheck, 1000 ; check every second
return

idleCheck:
if WinExist("App Name with or without Spaces") ; if app is running
{
    if(A_TimeIdle >= 270000) ; and there was no input in 4.5 min
    {
        WinActivate ; switch to that app
        sendInput z ; and perform an action
    }
}
return 

但是一旦盖子关闭(不在睡眠状态),它就没有明显的原因。

当它关闭或者#34;技巧时,有没有办法做事?操作系统认为盖子在关闭时是打开的。

希望这是有道理的。

解决方案不必仅限于.ahk。我只需要脚本工作,帮助不重要。

提前致谢。

1 个答案:

答案 0 :(得分:4)

假设您的笔记本电脑在盖子关闭时会进入某种“睡眠模式”。

如果是这样的话,我认为你不需要AHK脚本。

如果您转到控制面板中的电源设置选项..大多数情况下它看起来像这样: enter image description here


您可能需要找到高级电源选项,有时可以在电源计划下找到... enter image description here

我希望你能解释你需要做什么。

只需为盖子关闭操作选择“不做任何事”或类似操作。

之后,一切都应该继续运行,就像盖子打开一样。

相关问题