Hi.
I did this simple script (my first one). You can try it, it works with
Ctrl+Alt+v to paste-overwrite. Just save it in the "script\js" folder inside
PSPDAD installation folder.
Hernán
/*******************************************************************************
Filename: clip_paste_overwrite.js
Created: Fri, 09 April 2010 17:00:00 GMT
Created by: Hernán Sánchez
*******************************************************************************/
module_name = "clip_paste_overwrite";
module_ver = "1.0";
function Init()
{
addMenuItem("Paste - Overwrite", "Others", "paste_over", "Ctrl+Alt+v");
}
function paste_over()
{
var oEdit = newEditor();
try
{
oEdit.assignActiveEditor();
}
catch(e)
{
return;
}
var clipString = new String(getClipboardText());
var textLen = clipString.length;
var line = new String;
for (var i = 1; i <= textLen; i++) {
line = oEdit.lineText();
if (oEdit.caretX() <= line.length) {
oEdit.command('ecDeleteChar');
}
}
oEdit.command('ecPaste');
}
--
<http://forum.pspad.com/read.php?2,14427,53517>
PSPad freeware editor http://www.pspad.com