Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AutoHotkey in Windows 10 - Hotkeys not working in some applications

Tags:

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)

like image 292
phil294 Avatar asked Aug 05 '15 17:08

phil294


1 Answers

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 } 
like image 52
errorseven Avatar answered Sep 23 '22 13:09

errorseven