I have a very simple AutoHotkey script that listens for certain key presses to run Windows Shortcut files (lnk):
F21::
Run "C:\Users\djcim\Google Drive\Powershell Scripts\Admin Shortcuts\djcim\StartOBS.lnk"
Return
F22::
Run "C:\Users\djcim\Google Drive\Powershell Scripts\Admin Shortcuts\djcim\StopOBS.lnk"
Return
It seems to capture the key presses in most situations, however when I have certain programs focused like OBS or VSCode nothing happens.
Are these programs somehow blocking AutoHotkey from capturing these key presses? I have verified that neither of these programs are using F21 or F22 for shortcuts in program.
Answer
I am sure you meant F11 and F12.
If you are running an application with admin privileges, and at the same time, if AHK is running with lower privileges, then AHK won't intercept the key presses, and that could very well be the reason behind the problem you have described.
And if that is the case, the solution is to run the AHK script with the same privileges as other applications that you have mentioned.
More here:
No comments:
Post a Comment