Copy link to clipboard
Copied
Hello friends!
In the workspace I have several documents, however, I need to select and do something only on the documents indicated by a list.
I tried this but was unsuccessful!
var list =[1,4] // target documents
for (var i = documents; i < list.length; i++){
var d=Number( list[i])
var doc = documents[d]; activeDocument = doc;
alert("something");
}
var list =[1,4], // target documents
documents = app.documents;
for (var i=0; i< list.length; i++){
app.activeDocument = documents[list[i]];
alert("something");
}
* I hope you take into account that the indexing of documents in the collection starts from 0, not from 1
Copy link to clipboard
Copied
var list =[1,4], // target documents
documents = app.documents;
for (var i=0; i< list.length; i++){
app.activeDocument = documents[list[i]];
alert("something");
}
* I hope you take into account that the indexing of documents in the collection starts from 0, not from 1
Copy link to clipboard
Copied
Thanks jazz-y perfect, thanks for the quick response!
Thank you!
Copy link to clipboard
Copied
var i = documents;
Copy link to clipboard
Copied
r-bin, sorry, I did not understand your question?