AutoHotkey in Windows 10 - Hotkeys not working in some applications

孤人 提交于 2019-11-28 23:14:17

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
}
andre

Check "run this program as administrator" in:

autohothey.exe > properties > compatability > settings

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/

mihir patel

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!