0

Can I use AutoHotkey to make a hotkey that does a command specific to a certain program???
for example: opening the font settings in notepad

and if I can then how?
because all I seem to find is running a program or hitting some \keyboard buttons but can I do more?

1 Answer 1

1

You are likely looking for WinMenuSelectItem

From the docs: Invokes a menu item from the menu bar of the specified window.

WinMenuSelectItem, WinTitle, WinText, Menu , SubMenu1, SubMenu2, SubMenu3, SubMenu4, SubMenu5, SubMenu6, ExcludeTitle, ExcludeText


So for the Notepad font example, the Font setting is located in Format>Font of the Notepad menu. So, you could use something like:

#IfWinActive ahk_class Notepad  ;If Notepad is active
^q::WinMenuSelectItem, A, , Format, Font    ;Open Format>Font of actitve window
#If

to trigger the command on Control+q if notepad is the active window.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.