带有 Windows 键的 AutoHotkey 命令在提升的程序中停止工作
AutoHotkey commands with Windows key stopped working in elevated programs
我买了一台新笔记本电脑(Windows 10 的更新版本),我设置的许多 AutoHotkey 命令无法正常工作。具体来说,一些涉及 Windows 键 ⊞ 作为管理员的命令在应用程序 运行 中起作用,而有些则不起作用。
^#!v::MsgBox testing ; Ctrl + Windows + Shift + v Works everywhere
^#v::MsgBox testing ; Ctrl + Windows + v Does not work in admin windows
#v::MsgBox testing ; Windows + v Does not in admin (opens clipboard mgr)
^#![::MsgBox testing ; Ctrl + Windows + Shift + [ Works everywhere
^#[::MsgBox testing ; Ctrl + Windows + [ Works everywhere
#[::MsgBox testing ; Windows + [ Works everywhere
⊞n 在管理员 windows 中工作。 ⊞t 没有。 ⊞s没有.
我不是 运行宁 AutoHotkey 作为管理员。所有这些命令在我以前的笔记本电脑上的管理员 windows 中都没有问题,所以我假设这是一个 Windows 10 更新问题。
我不确定为什么您的热键在您以前的笔记本电脑上有效。
By default, UAC protects "elevated" programs (that is, programs which are running as admin) from being automated by non-elevated programs, since that would allow them to bypass security restrictions. Hotkeys are also blocked, so for instance, a non-elevated program cannot spy on input intended for an elevated program.
https://autohotkey.com/docs/FAQ.htm#uac
https://www.autohotkey.com/boards/viewtopic.php?t=21278
可能 UAC 被禁用或设置为更宽松的设置。也许这确实是您建议的 Windows 10 更新问题。如果您不愿意 运行 您的脚本作为管理员,您可以禁用 UAC,但通常不推荐这样做。
我买了一台新笔记本电脑(Windows 10 的更新版本),我设置的许多 AutoHotkey 命令无法正常工作。具体来说,一些涉及 Windows 键 ⊞ 作为管理员的命令在应用程序 运行 中起作用,而有些则不起作用。
^#!v::MsgBox testing ; Ctrl + Windows + Shift + v Works everywhere
^#v::MsgBox testing ; Ctrl + Windows + v Does not work in admin windows
#v::MsgBox testing ; Windows + v Does not in admin (opens clipboard mgr)
^#![::MsgBox testing ; Ctrl + Windows + Shift + [ Works everywhere
^#[::MsgBox testing ; Ctrl + Windows + [ Works everywhere
#[::MsgBox testing ; Windows + [ Works everywhere
⊞n 在管理员 windows 中工作。 ⊞t 没有。 ⊞s没有.
我不是 运行宁 AutoHotkey 作为管理员。所有这些命令在我以前的笔记本电脑上的管理员 windows 中都没有问题,所以我假设这是一个 Windows 10 更新问题。
我不确定为什么您的热键在您以前的笔记本电脑上有效。
By default, UAC protects "elevated" programs (that is, programs which are running as admin) from being automated by non-elevated programs, since that would allow them to bypass security restrictions. Hotkeys are also blocked, so for instance, a non-elevated program cannot spy on input intended for an elevated program.
https://autohotkey.com/docs/FAQ.htm#uac
https://www.autohotkey.com/boards/viewtopic.php?t=21278
可能 UAC 被禁用或设置为更宽松的设置。也许这确实是您建议的 Windows 10 更新问题。如果您不愿意 运行 您的脚本作为管理员,您可以禁用 UAC,但通常不推荐这样做。