• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Identify document order

Engaged ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

Hello everyone! How to get the order number of the active document?

Captura de tela 2020-10-07 000306.png

TOPICS
Actions and scripting

Views

254

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 06, 2020 Oct 06, 2020

Try the following

for(var i = 0; i < app.documents.length; i++)
{
	if(app.documents[i] == app.activeDocument)
		alert(i + 1)
}

-Manan

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 06, 2020 Oct 06, 2020

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

LATEST

Perfect! Thank you Manan Joshi

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2020 Oct 06, 2020

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); 
JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines