AutoHotkey in Windows 10 - Hotkeys not working in some applications

后端 未结 5 1059
北荒
北荒 2020-12-15 05:55

A simple script like

a::msgbox hi!

used to work fine under Windows 7. Now that I upgraded to Windows 10, it isn\'t working when certain win

相关标签:
5条回答
  • 2020-12-15 06:02

    Check "run this program as administrator" in:

    autohothey.exe > properties > compatability > settings

    0 讨论(0)
  • 2020-12-15 06:03

    Being that Windows 10 was just released, this is very relevant question and I'm sure that many users will appreciate help in getting their scripts to run properly on this new OS. It's possible someone thought that this question was to broad in scope or maybe improperly classified, as it's a Windows issue rather than a specific AutoHotkey problem?

    From my understanding the issue lies in new UAC settings. A simple solution is to run your script as an Administrator. To do this right click on the file -> select "Run as Administrator"

    Edit:

    I don't have a direct answer to give regarding running an application or file always as an Admin (in Windows 10), but this guide I found seems to cover every way possible to do so in Windows 10.

    http://www.tenforums.com/tutorials/3436-run-administrator-windows-10-a.html

    Another alternative is to have the script check if it is running as Admin, if not reload as Admin. Code was pulled from the Help File:

    if not A_IsAdmin
    {
       Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
       ExitApp
    }
    
    0 讨论(0)
  • 2020-12-15 06:05

    Everything Search Engine was also not working for me.

    Before, compiling the .ahk script to .exe would solve any issues.

    Windows 10 gave me problems again.

    The following information helped me fix it:

    On Windows 8 and later, UAC can only be disabled by modifying the registry, and doing so breaks apps.

    As I said, "turning off" UAC in Control Panel on Windows 8 and later just suppresses the Yes/No prompts; programs are still run with limited privileges by default.

    https://autohotkey.com/boards/viewtopic.php?t=9770

    disable UAC via the registry, you’ll need to head to the start menu search box and type in regedit.exe and browse down to the following key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
    

    Over on the right-hand side, you should see a setting for EnableLUA, which you’ll want to customize as follows:

    UAC Enabled: 1
    UAC Disabled: 0
    

    http://www.howtogeek.com/howto/4820/how-to-really-completely-disable-uac-on-windows-7/

    Also on the howtogeek page:

    Just download, extract, and double-click on the included ReallyDisableUAC-Win7.reg file to disable UAC.

    You’ll need to reboot for the setting to actually take effect.

    There’s also an included registry hack file to re-enable it as well.


    • Disable UAC completely. As you noted, this will kill apps on Windows 10 (or 8).

    • Create a patched executable using EnableUIAccess, and then use that executable to run the script.

    https://autohotkey.com/board/topic/148522-sendplay-windows-10-trouble/

    0 讨论(0)
  • 2020-12-15 06:11

    Try starting your exe with admin rights (i.e. right click on your exe and then run as administrator).

    0 讨论(0)
  • 2020-12-15 06:17

    Instead running the script with usual AutoHotKey:

    click right -> Run with UI Access

    To always run with UI access, change default app for running the script to:

    "C:\Program Files\AutoHotkey\AutoHotkeyU64_UIA.exe"

    Or:

    "C:\Program Files\AutoHotkey\AutoHotkeyU_UIA.exe"

    0 讨论(0)
提交回复
热议问题