AHK Always on Top 不适用于 Windows 文件资源管理器和其他 Windows 系统 windows?

AHK Always on Top not working for Windows File Explorer and other Windows system windows?

我一直在使用 Alwaysontop AHK 脚本让我的 windows 保持在其他 windows 之上。

这是有问题的代码:

^SPACE:: Winset, Alwaysontop, , A ; ctrl + space
Return
~#!x::Suspend

它几乎适用于我使用的几乎所有 window,除了基于 Windows 的 windows - 例如文件资源管理器、任务管理器等...

我怎样才能让这些 windows 也与脚本一起工作?

我以前使用 WinSpy 来获取有关特定 Windows 事物的信息,但我不确定要在这里寻找什么,或者是否有更简单的解决方案可以强制 Windows-based windows 与脚本一起运行。

有什么想法吗?

AHK 不会拦截程序 运行 提升权限中的按键,除非脚本本身是 运行 这样的:

#UseHook

; If the script is not elevated, relaunch as administrator and kill current instance:

full_command_line := DllCall("GetCommandLine", "str")

if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try ; leads to having the script re-launching itself as administrator
    {
        if A_IsCompiled
            Run *RunAs "%A_ScriptFullPath%" /restart
        else
            Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
    }
    ExitApp
}

            RETURN   ; === end of auto-execute section ===

; ctrl + space:
^SPACE:: Winset, Alwaysontop, , A

~#!x::Suspend

有关详细信息,请阅读 https://autohotkey.com/docs/commands/Run.htm#RunAs