Alex Rivera | Logout

How to write macro for Notepad++?

Asked 2008-12-12T10:43:28.857
40

I would like to write a macro for Notepad++ which should replace char1, char2, char3 with char4, char5, char6, respectively.

Edit
Report

3 Answers

7

I recorded a macro and I found it in %APPDATA%\Notepad++\shortcuts.xml. It looks like posted in the first post of this thread.

I use NPP Ver. 5.9.6.2 with Win7.

answered 2011-12-08T10:24:14.010
-1

I'm not sure if this helps, but I needed to create a macro to hold a snippet, so I simply recorded myself inserting the items and set a shortcut to it. Granted, I'm not using version 5.9 so there might be some slight version differences. To access the macro recorder go to Macro > Start Recording. Then you will perform your action and then go to Macro > Stop Recording. I'd recommend playing it back to ensure it's correct and then save and set your shortcut key.

Hope the helps.

answered 2011-05-12T18:04:57.780
-1

I just did this in v5.9.1. Just go to the Macro Menu, click "Start Recording", perform your 3 replace all commands, then stop recording. You can then select "Save Current Recorded Macro", and play it back as often as you like, and it will perform the replaces as you expect.

answered 2011-08-03T12:13:41.393

Your Answer