Skip to main content
Participant
January 6, 2024
Question

UXP script that iterates through all documents

  • January 6, 2024
  • 1 reply
  • 286 views

Hi,
Im very new to UXP. Not really sure how to use it but I've done Photoshop scripts before using the old method (which I can still use but I would like to move forward with UXP).
I wonder how to create a uxp script that runs through all documents.

In the old way I can just write: 

 for(i=0; i<app.documents.length;i++){
     app.activeDocument = app.documents[i];
     resizeDoc(3000, 2000); //dummy function that runs through every document
}

I have no idea how to write something similar using uxp or maybe it has to be written differently if using the new Javascript. Appreciate anybody who can help. Thanks!
This topic has been closed for replies.

1 reply

Inspiring
January 6, 2024

Unfortunately uxp is too young and full of problems, I find it immature and poorly documented, but if you want to find out more there is a specific forum, it's not like this one which is made up of helpful people, in that forum they are more reluctant to give help, in any case this is the forum https://forums.creativeclouddeveloper.com/c/photoshop/63

Participant
January 6, 2024

Thank you! I will check out this forum.