<http://forum.pspad.com/read.php?f=2&i=12131&t=12082> 
----------------------------------------------------------------

no, code is not self containing : you need to 

1 - copy the preceding code in a function named 'commentSelText'

2 - add this threefunctions to it :

function getFileExtension( aFileName)
{
  if ( aFileName == "") return  "";
  var name = aFileName.substr( aFileName.lastIndexOf( "\\"));
  if ( name == "") return "";
  var tab = name.split( ".");   
  return tab[ tab.length - 1].toLowerCase();
}

function curEditor()
{
  var obj1 = newEditor();
  obj1.assignActiveEditor();
  return obj1;
}

function Init()
{
 addMenuItem( "add comments", "", "commentSelText", "CTRL+ALT+M");
 
}
----------------------------------------------

save all in a file .js in PSPad/script/Jscript and then PSPad menu
scripts/compile scripts

please read help for customization to understand script functions in PSPad
...

-- 
PSPad freeware editor http://www.pspad.com

Reply via email to