我使用编辑宏代码ExtractLinesContain.jsee (从编辑宏库下载)搜索特定文本的文本文件。这段代码工作得很好。它正在将结果粘贴到新文件中。但我希望结果被复制到剪贴板,也应该被发送到电唱机。上述代码需要进行三次修改。
使用分隔符“
‘
WshShell.Run ( "PotPlayerMini64.exe /clipboard“)
请帮帮我。
发布于 2020-09-11 15:31:59
ExtractLinesMulti.jsee宏非常老,我使用批处理查找/提取EmEditor的特性重写了宏。下面是一个宏,该宏提取包含由|分隔的任何指定多个字符串的行
if( !editor.EnableTab ){
editor.EnableTab = true;
alert( "Please run this macro again." );
Quit();
}
sFind = prompt( "This macro extracts lines that do contain any of the specified multiple strings separated by |:", "" );
if( sFind == "" ){
Quit();
}
var sArr = sFind.split("|");
batch_list = editor.filters;
for( i = 0; i < sArr.length; ++i ) {
batch_list.AddFind(sArr[i],eeFindReplaceCase,0);
}
document.selection.BatchFind(batch_list, eeFindExtract | eeFindLineOnly,0);
document.selection.SelectAll(); // select all text
document.selection.Copy(eeCopyUnicode); // copy the seleciton to the Clipboard可以将任何代码添加到此宏的末尾。
参考资料:http://www.emeditor.org/en/macro_selection_batch_find.html
https://stackoverflow.com/questions/63849309
复制相似问题