How to define app.activeBook.fullName ?
Hi experts,
my script like this:
var myFolder=Folder(app.activeDocument.fullName);
var myFolder= Folder(app.activeBook.fullName);
if(myFolder.parent.fsName.match(/M:\\Announcement/)) {
return File(adPath + cName);
}
else if(myFolder.parent.fsName.match(/M:\\Document folder/)) {
return File(cirPath + cName);
}
else if(myFolder.parent.fsName.match(/J:\\/)) {
return File(arPath + cName);
}
else if(myFolder.parent.fsName.match(/K:\\/)) {
return File(irPath + cName);
}
else if(myFolder.parent.fsName.match(/N:\\/)) {
return File(ipoPath + cName);
}
else if(myFolder.parent.fsName.match(/Shun Hing folder/)) {
return File(shunhingPath + cName);
}
else if(myFolder.parent.fsName.match(/L:\\Other Folder/)) {
return File(othersPath + cName);
}
how to define:
var myFolder=Folder(app.activeDocument.fullName || app.activeBook.fullName);
??
thanks
regard
John
