switch between active documents (Ctrl+Tab)

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

klevteev
Posts: 17
Joined: Wed Nov 06, 2019 1:22 pm

switch between active documents (Ctrl+Tab)

Post by klevteev »

Good day!
Please tell me the syntax to switch to another active document in photoshop?
after duplication... similar to Ctrl+Tab

I can save and close the open active document of course and work with the original, but still want to check with the first.
So, as a result how to switch between active documents a script?

With respect, klevteev!
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: switch between active documents (Ctrl+Tab)

Post by Kukurykus »

You can also preced one by minus for previous document:

Code: Select all

sTT = stringIDToTypeID; (ref = new ActionReference())
.putOffset(sTT('document'), 1); (dsc = new ActionDescriptor())
.putReference(sTT('null'), ref), executeAction(sTT('select'), dsc)
klevteev
Posts: 17
Joined: Wed Nov 06, 2019 1:22 pm

Re: switch between active documents (Ctrl+Tab)

Post by klevteev »

Thanks, but I used this:

Code: Select all

ishDoc = app.activeDocument

var theCopy = aDoc.duplicate (filename);
FaceDoc = app.activeDocument

app.activeDocument = ishDoc
So, I can change this)