Is there a way to run a macro using NPPExec script in notepad++? Thank you very much for your help.


I have also tried to find the solution here and the NPPExec Manual that can be accessed within NPPExec menu of NP++. I have successfully run many applications (like R, pdflatex etc). But I was unable to run (or even access) macro through NPPExec.

migrated from stackoverflow.com Apr 14 '12 at 20:13

This question came from our site for professional and enthusiast programmers.

  • the above link died – Stat-R May 30 '13 at 21:47

This sourceforge link shows something along the lines of what you're looking for. Go through it in detail. I don't have too much experience working with Notepad++ macros, but it seems that you can accomplish only Scintilla hacks this way. None of the methods in the page are exactly what you're looking for, but this is closest.

  • I want to run any macro (starting with the in build ones). Do you have a way? See my edits @ prrao – Stat-R Apr 19 '12 at 18:46
  • Are you referring to inbuilt Notepad++ Macros? Or external macros like VBAs? – prrao Apr 19 '12 at 19:25
  • Sorry I should have been clear. I am taking about inbuilt Notepad++ macros – Stat-R Apr 19 '12 at 19:34
  • @Stat-R Are you looking to run a bunch of macros through a script? Can't you just run them one by one using shortcuts? That seems to be your best bet since NppExec doesn't seem to have this functionality – prrao Apr 19 '12 at 23:49

I did some research and could find some level of solution. One can use Send command in AutoIt to send short-cut keys corresponding to the macro using NPPExec. More complicated tasks can be automated using this strategy. A similar post can be found here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.