my plug-in has a subcommand. Is there a way to specify that via a xParam ?
I am not sure what you mean by “subcommand”. In Windows menus, there are either separator lines, submenus, or command entries. Command IDs are only available for command entries, nothing else has a command ID.
For example, as NppUISpy shows in my current Notepad++ environment:
fc4147e2-4fd6-471b-a374-b0bbd1609728-image.png
Plugins > Python Script is a submenu, so it has a command ID of “0”. Then it has some actions which are 22108-22111. Then it has a Scripts submenu with id=0. Then there is the startup script command entry inside that menu, with id=23034, another couple of submenus, then a script that is called aaa123 with id=23127. So if I wanted to run the aaa123 script from a macro, I could create a macro that calls that number, such as
<Macro name="Example" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="2" message="0" wParam="23127" lParam="0" sParam="" /> </Macro>There is also a keyboard shortcut for the subcommand. Is there a way to execute that in the macro?
If that keyboard shortcut is editable using the Notepad++ built-in shortcut mapper, then the chances are, it will be able to run that using the number that UI Spy shows you. But plugins can also define keyboard shortcuts not using the Shortcut Mapper (though that’s an evil practice, since it makes for unknown shortcut conflicts) – so having a shortcut is not a guarantee that the plugin is playing nice.
(note: didn’t see your “nevermind” until after I had the whole post basically written, so I am including it for future readers, and you if you care to have the extra info)