phil294
phil294

Reputation: 10852

AutoHotkey in Windows 10 - Hotkeys not working in some applications

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 windows are active. Specially LButton-Hotkeys can mess up everything, leading to the situation where you actually need Task Manager.

Here is a small list of applications in which hotkeys are not recognized anymore: (instead, as of the above script, a simple a is sent)

Where it does work: (examples)

Can someone reproduce this?

What's wrong with AutoHotkey in Win10?

How can this be fixed?

(AHKscript vers. 1.1.22.3 Unicode 64-bit)

Upvotes: 22

Views: 37316

Answers (5)

Sam Masri
Sam Masri

Reputation: 61

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"

Upvotes: 1

mihir patel
mihir patel

Reputation: 191

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

Upvotes: 2

Jeff Kang
Jeff Kang

Reputation: 279

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/

Upvotes: 0

andre
andre

Reputation: 149

Check "run this program as administrator" in:

autohothey.exe > properties > compatability > settings

Upvotes: 14

errorseven
errorseven

Reputation: 2672

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
}

Upvotes: 20

Related Questions