Reputation: 35
I tried to record the action of Encoding > Convert to ANSI and save it as a macro so that I can copy and add the its code to another macro. This is the recorded code:
<Macro name="convert to ANSI" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="0" message="2004" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2025" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2422" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2325" wParam="0" lParam="0" sParam="" />
</Macro>
If I run it in a file, the output is the code itself (or a few lines from another macro saved in shortcuts.xml), just overwrites the original contents of the file.
Anybody knows how to fix it?
Upvotes: 0
Views: 2505
Reputation: 10149
If you are comfortable using the NppExec plugin available from the PluginManager, then you could use this simple NppExec Script:
NPP_MENUCOMMAND Encoding/Convert to ANSI
Just use Plugins -> NppExec -> Execute... , enter the script, either hit OK or save it for later reuse. (The script is saved in the file npes_saved.txt
. You find this file in the plugins\Config
subdirectory either in your users Notepad++ path or in the installation directory of Notepad++).
Create a keyboard shortcut for the script
Save...
button in the dialog: Upvotes: 1