在记事本++控制台中运行选定的行 [英] Run selected line in notepad++ console

查看:213
本文介绍了在记事本++控制台中运行选定的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这可能看起来有点太明显,但是我仍然坚持使用它。

我正在编写一个notepad ++中的ffmpeg代码,我想运行选择的代码行直接在记事本++控制台(nppexec插件控制台)。


说,我有四行代码,我只想运行第二行(选择行):




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键。我知道这是非常noobie!


请帮助用快捷方式来实现这一点。

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.

推荐答案

一旦我创建一个小型的nppexex脚本,可以在选择上运行一个外部命令,根据你可以使用一个nppexec脚本,如:

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

请使用带有ansi编码的ffmpeg命令保存文件(UTF8在选择开始时出现一些奇怪的字符)。

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).

脚本将选择存储在蝙蝠文件中,然后使用 cmd / c

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

这篇关于在记事本++控制台中运行选定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆