Источник:
https://vasantharivali.wordpress.com...-script-class/
==============
Hi Friends,
Here I have posted the code for auto comments by amending Editor Scripts class.
Adding auto script CODE comments
// Changes: XYZ to your intial name
public void addCommentsCODE(Editor _e)
{
int startLine = _e.selectionStartLine();
int endLine = _e.selectionEndLine();
str prefixCompany = “CONTOSO”;
str developerID;
str tagStart;
str tagEnd;
;
switch (curUserId())
{
case “vasan”: developerID = “Vasanth”;
break;
case “steve”: developerID = “Steven”;
break;
default:
developerID = “XYZ”;
}
tagStart = strFmt(“//–> %1 modified on %2 %3 by %4: %5 ~ mod description\n”,
enum2str(currentAOLayer()),
date2str(today(), 321, 2, 3, 3, 3, 4), time2str(timeNow(), 1, 1),
prefixCompany,
developerID
);
tagEnd = strfmt(“// scripts -> you find the method created. Hope it will help you.
// Vasanth Arivali
Источник:
https://vasantharivali.wordpress.com...-script-class/