Answered
select document -1
I have several opened documents, manually selected is the last one
How I can select the previous opened document with script?
(I want to loop all)
How I can get the selected document index?
I have several opened documents, manually selected is the last one
How I can select the previous opened document with script?
(I want to loop all)
How I can get the selected document index?
I don't know what exactly you want.
But give this snippet a try:
(Requirement: Three or more documents are already open in Illustrator)
var docs = app.documents;
alert(docs[0].name + " is active");
// way no.1
app.activeDocument = docs[1]; // was previous active - is active now
$.sleep (1000);
// way no.2
app.documents[2].activate(); // was second last active document - is active now
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.