Copy link to clipboard
Copied
Hello everyone! How to get the order number of the active document?
Try the following
for(var i = 0; i < app.documents.length; i++)
{
if(app.documents[i] == app.activeDocument)
alert(i + 1)
}
-Manan
Copy link to clipboard
Copied
Try the following
for(var i = 0; i < app.documents.length; i++)
{
if(app.documents[i] == app.activeDocument)
alert(i + 1)
}
-Manan
Copy link to clipboard
Copied
Perfect! Thank you Manan Joshi
Copy link to clipboard
Copied
var msg = "";
for (var i=0;i<app.documents.length;i++) {
if(app.documents[i] == app.activeDocument) msg = msg + "Document " + (i +1) + " " + app.documents[i].name + " is Active Document\n";
else msg = msg + "Document " + (i +1) + " " + app.documents[i].name + "\n";
}
alert(msg);