22

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)

  • Team Speak 3
  • Everything
  • Fraps

Where it does work: (examples)

  • Editor
  • Skype
  • Windows Apps in general
  • Ahk help
  • Open Office
  • (most programs)

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)

4
  • 1
    I have yet to upgrade to Win 10, but from what I've read online regarding issues.. most scripts require Administrator rights to work properly in Win 10. Hope this helps.
    – errorseven
    Aug 5, 2015 at 17:36
  • 1
    I cant believe it. My user account has got administrator rights, but still the script has to be run as an admin. all ahk stuff works fine, apart from hotkeys in some application as stated above. It's fixe however in admin mode. thanks for your help, would you mind posting an answer..?
    – phil294
    Aug 5, 2015 at 21:21
  • 1
    also, @downvoter, i would have loved to know how i could have improved my question. but you didnt tell me so i fear i'll have to continue in this style
    – phil294
    Aug 5, 2015 at 21:22
  • @Blauhirn from his name you know he's a spammer. Don't waste time on him.
    – WesternGun
    May 25, 2017 at 14:03

5 Answers 5

20

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
}
2
  • 1
    yup, just tried the latter, doesn't work. still trying to find out how to run an ahk script as administrator permanently. Thanks again.
    – phil294
    Aug 6, 2015 at 13:33
  • This is still not working for me. :(. Works in chrome but not in firefox. Doesn't work on desktops but works elsewhere
    – Vijay
    Jan 7, 2020 at 21:31
14

Check "run this program as administrator" in:

autohothey.exe > properties > compatability > settings

1
  • This plus a quick reboot worked for me. It should be also noted if you have any keys launching applications that resided in 'My Documents' they will need to be re-pathed to 'Documents' in Win10.
    – Dom
    Jan 6, 2016 at 21:16
2

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

1
  • This worked for me as I was having a problem running Windows Terminal using BASH which I run in ADMIN mode and the hotkeys wouldn't work at all until I compiled it and changed it to run as an ADMIN, then it ran properly. Aug 23 at 17:46
1

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

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.