i am using the emeditor macro code ExtractLinesContain.jsee (downloaded from emeditor macro library) to search text file for certain text. this code is perfectly working. it is pasting the results to new file. but i want the result to be copied to clipboard and also should be sent to potplayer. three modifications are required in the above code.
WshShell.Run ( "PotPlayerMini64.exe /clipboard" );
please help me.
The ExtractLinesMulti.jsee macro is very old, and I rewrote the macro using the Batch Find/Extract feature of EmEditor instead. Here is the macro that extracts lines that do contain any of the specified multiple strings separated by |
:
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
You can add any code you want to the end of this macro.
References: http://www.emeditor.org/en/macro_selection_batch_find.html