vbr:
--------------------------------------------------------------------------------
Probably it shouldn't be hard to add this functionality via WSH scripting.
--------------------------------------------------------------------------------


Well, here is one attempt (due to the scripting limitation, it doesn't work with
unicode characters besides those supported by the national codepage - in the
given locale setting).

/////////////////
var module_name = "copyLineNr"; 
var module_ver = "0.0.1";

function copyWithLineNrs(){
if (editorsCount()<1){return;}
var actEd = newEditor();
actEd.assignActiveEditor();
var selectedText = actEd.selText();
var firstSelLine = actEd.blockBeginY();
var lastSelLine = actEd.blockEndY();
var lineNr = firstSelLine - 1;
var numberedSelText = selectedText.replace(/([^\n\r]*(?:
)?)/g, function
(match, lnTxt){lineNr += 1; if (lineNr <= lastSelLine){ return (lineNr + ": " +
lnTxt);} } );
//echo(selectedText + "\n------------\n" + numberedSelText);
setClipboardText(numberedSelText);
}


function Init(){ 
addMenuItem("copyWithLineNrs", "", "copyWithLineNrs","Ctrl+Shift+C"); 
}


////////////////

-- 
<http://forum.pspad.com/read.php?2,48382,48386>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem