Copy link to clipboard
Copied
I always use many open documents
from 3 to 10 documents
I need a script that immediately selects the first one as in the figure.
I tried to make an action, but it takes into account the open documents,
so when I create the action that has 3 open documents and then I want to use it when I have 6, it doesn't work.
do you have any idea how to proceed
I need a script that immediately selects the first one as in the figure.
By @Ciccillotto
Not sure about UXP .psjs, however, in legacy ExtendScript .jsx:
app.activeDocument = app.documents[0];
Copy link to clipboard
Copied
I need a script that immediately selects the first one as in the figure.
By @Ciccillotto
Not sure about UXP .psjs, however, in legacy ExtendScript .jsx:
app.activeDocument = app.documents[0];
Copy link to clipboard
Copied
It worked fine in uxp Thanks for your help
Copy link to clipboard
Copied
You're welcome, there is some crossover in ES vs. UXP DOM, but it's not my default expectation that things are 1:1 so I wasn't sure without checking.
Copy link to clipboard
Copied
Some things work, some don't, some aren't usable.
Copy link to clipboard
Copied
Some things work, some don't, some aren't usable.
By @Ciccillotto
In the ES DOM, both of these are valid:
var theDoc = app.activeDocument;
//or
var theDoc = activeDocument;
While in the UXP DOM, one can't omit the root app. path:
let theDoc = app.activeDocument;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now