1


This might seem a bit too obvious but I am stuck with it anyway.
I am editing an ffmpeg code in notepad++ and I want to run the selected line of code directly in notepad++ console (nppexec plugin console).
say, I have four lines of code, and I want to run only the second line (selected line):

enter image description here

currently, I am coping the line and pasting it in the console and hitting enter. I know it is very noobie!
Please help to achieve this with a shortcut or something.

cplus
  • 1,115
  • 4
  • 22
  • 55

1 Answers1

1

Once I created a small nppexex script, to run an external command on the selection, based on that you can use a nppexec script like:

sel_saveto c:\Temp\NPP_Selection.bat
cmd /c c:\Temp\NPP_Selection.bat

Please save your file with the ffmpeg command with ansi encoding (with UTF8 there was an error with some strange characters at the start of the selection).

The script stores the selection in a bat file and then runs it with cmd /c

Lars Fischer
  • 9,135
  • 3
  • 26
  • 35
  • it is working but, each time I have to hit F6 and choose this command from the list and run. a bit of long process when you are dealing in mass scale work. How can I add a shortcut key to this? thanks – cplus Mar 09 '16 at 18:40
  • 1
    The Plugins->NppExec Menu has an entry Direct Execute Previous (F9 at least in my config, you can change and assign shortcuts with the Settings -> Shortcut mapper... ). – Lars Fischer Mar 09 '16 at 18:53