Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ using "Run" command in a macro

Is it possible to create a macro in Notepad++ that is able to utilize the "Run" command so that I may call an external .exe to operate on the file specified? I am able to do it manually, but when I create a macro that includes the run (F5) and give it a specified command it fails to execute. Is this because the run command isn't supported when creating macros? If so, is there a work-around method?

Thanks

edit: to add context -- I've written a couple ruby scripts to facilitate data-entry that's done using notepad++, and would like to integrate them to the editor. Having them run by a shortcut method created by recording a macro seems to be the best way to do this, unless it's not possible to utilize the run command.

like image 814
hp43 Avatar asked Jul 12 '12 16:07

hp43


2 Answers

FWIW The Zeus and Zeus Lite editors can do this.

like image 145
jussij Avatar answered Sep 28 '22 23:09

jussij


You can do it with the NppExec plugin (available in the Notepad++ wiki ). It allows you to create mini-scripts with keywords that perform commands.

You will also be able to add your script in the contextual (right-click) menu, or assign a shortcut to it.

I personaly uses it to saves a sql file, place myself in the current directory, and then executes isql.exe (external executable) on that file. That simple script transforms my Notepad++ into a rather handy SQL IDE.

like image 31
Ksempac Avatar answered Sep 28 '22 23:09

Ksempac