Reputation: 20212
Is it possible to show the script of a macro to learn what it actually does?
Where are the macros stored so I can inspect the files, maybe they are human readable.
Upvotes: 1
Views: 2077
Reputation: 7260
The default path of shortcuts.xml
is C:\Users\%YOUR USERNAME%\AppData\Roaming\Notepad++
Here’s an simple RegEx replacement example of some of mine:
<Macro name="SO-Test" Ctrl="yes" Alt="no" Shift="yes" Key="112">
<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1601" wParam="0" lParam="0" sParam="(.+)" />
<Action type="3" message="1625" wParam="0" lParam="2" sParam="" />
<Action type="3" message="1602" wParam="0" lParam="0" sParam="\1 \1" />
<Action type="3" message="1702" wParam="0" lParam="768" sParam="" />
<Action type="3" message="1701" wParam="0" lParam="1609" sParam="" />
</Macro>
There are 2 locations that the shortcuts.xml
file resides in. Notepad++ could be using either one, depending on how it was installed. Try the C:\Program Files\Notepad++ folder or C:\Program Files (x86)\Notepad++ folder.
Depending on whether you installed the 32bit or 64bit Notepad++ program it could be in either of the 2 Program Files folders (you can only install 64bit version if Windows is also 64bit).
Upvotes: 1
Reputation: 8962
Once macro is saved, and Notepad++ is closed, macro will be saved to:
%USERPROFILE%\AppData\Roaming\Notepad++\shortcuts.xml
(c:\Users\%your user%\AppData\Roaming\Notepad++\shortcuts.xml)
Into <Macros>
tag. It's sort of human readable: as each step is an <Action>
tag, so steps could be deleted/copy-pasted, but to create a new steps it's much easier to record a new macro.
Upvotes: 2