Somehow AutoHotkey doesn’t send Alt+keys to a program

autohotkey

I'm using the following AutoHotkey script:

Numpad4::Send !f

When pressing Numpad4 AutoHotkey is supposed to send "Alt+F" to the program currently opened.
Nothing happens however – I've also tried:

Numpad4::!f

and

Numpad4::Send {Alt}f

Any ideas how I can get this working?

Best Answer

Try this:

Numpad4::
KeyWait Alt
Send f
return

I know you technically want it to hit alt then f, but this has the same effect.

Related Question