I am trying to add a program specific shortcut, i.e. a shortcut to be used inside OneNote App only, and not the short cut for the opening of app itself. Here is how the present script is:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive, ahk_exe OneNote.exe
+Enter::
Send, {(}!+d{)}
return
But the above one works in OneNote desktop and not for the "OneNote for Windows 10" app (OW10A); how do I make it work for that store app? I am not able to find .exe for the store app to mention it in the above script.
You can use the #If- or the #IfWinActive- directive to create context-sensitive hotkeys and hotstrings:
https://autohotkey.com/docs/commands/_If.htm
Use Window Spy to get detailled information about the program windows.