AutoHotKey intercepting F12 Key

beatified
beatified used Ask the Experts™
I have a program that uses F12 and it seems when I have a AHK Script waiting in the background it seems to intercept the F12 Key before the program can get it.

Is there a way to disable the F12 Key from being intercepted by AHK.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018
Hi Stuart,
Sure, no problem doing that. Post the AutoHotkey script and I'll disable F12 for you. Or just look for this in the script:

F12::
----- other AHK code is here
Return

Open in new window

Change it to this:
/*
F12::
----- other AHK code is here
Return
*/

Open in new window

That comments out the F12 key...AutoHotkey will no longer intercept it. But whatever AutoHotkey is doing with F12 now...would you like to still have that functionality available via some other hotkey...maybe Alt+F12 or Ctrl+F12 or Alt+Ctrl+F12 or something else? If so, you could do this, for example:

!^F12:: ; hotkey is now Alt+Ctrl+F12
----- other AHK code is here
Return

Open in new window

Regards, Joe
Thanks for the reply Joe,
I don't use F12 as a hotkey for the script nor is it referenced in the script. It is just being intercepted and not allowing the F12 Key to function in the program I am using at the time. So I'm not sure that the above solution takes this into account maybe it does I don't know.

Let me know what you think.
Stuart
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018
I've never seen AutoHotkey intercept keystrokes that aren't specified in a running script. You say, "...it seems to intercept the F12 Key before the program can get it." I doubt that...what makes you think so?
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Well when I have the scripts waiting in the background the F12 Key doesn't work but when I exit the scripts so they are not waiting for their hot keys the F12 works again.
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018
> scripts waiting in the background

I presume you mean that the AutoHotkey scripts are running. With the plural on scriptS, it sounds as if there are several...did you check them all for an F12 hotkey?

Try this...exit all the scripts...put this command as the first line in each one:

ListHotkeys

Run all the scripts...look at the ListHotkeys output...do you see F12 in there?
I think i narrowed down the problem. It seems to be an issue with Pulover's Macro Creator. I really just need to leard AHK directly I think I will save myself a lot of grief in the long run.

I converted the PMC files to AHK and it seems to no longer be an issue.
Developer
Fellow 2017
Most Valuable Expert 2018
> It seems to be an issue with Pulover's Macro Creator.

Doesn't surprise me.

> I really just need to learn AHK directly I think I will save myself a lot of grief in the long run.

Absolutely! I mentioned something along those lines during some of our previous AutoHotkey threads.

> I converted the PMC files to AHK and it seems to no longer be an issue.

Glad to hear it. Regards, Joe
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018
Hi Stuart,
I'm trying to clean up open questions at EE...this is one of them. Do you need more help with it? Regards, Joe

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial