Doubt in Document in Template
Hi All,
I am the beginner. I am studying through "InDesignCS3_ScriptingGuide_JS".
In page no 13, there is script 'save a document as a template'
Below script i am not able to understand, Can anyone explain it breifly if you willing.
Lines are below.
var myFileName;
if(app.activeDocument.saved == true){
//Convert the file name to a string.
myFileName = app.activeDocument.fullName + "";
//If the file name contains the extension ".indd", change it to ".indt".
if(myFileName.indexOf(".indd")!=-1){
var myRegularExpression = /.indd/gi
myFileName = myFileName.replace(myRegularExpression, ".indt");
}
}
Thanks in advance for all you read my scripts.
Thanks
BEGINNER