Skip to main content
Known Participant
March 17, 2025
Question

Detect photoshop pop-up window when opening psd file

  • March 17, 2025
  • 1 reply
  • 289 views

Hello everyone~

I am working on a tool to automate some tasks in photoshop. One of the steps is to open psd files in batch to process the tasks.
The problem is that sometimes there will be some popups that appear right after opening the file (or appear after I perform some automated operations). For example, Missing relink smartobject layer, Psd is locked,...

 

Is there any solution to detect these popups (then I can do a close photoshop action and exclude the corrupted files from the processing list)? I am using python and the photoshop-python-api library.

1 reply

Chuck Uebele
Community Expert
Community Expert
March 17, 2025

While I only do extend script, would a simple try catch routine work?

Known Participant
March 17, 2025

i-i don't quite understand, please explain what you mean.

Chuck Uebele
Community Expert
Community Expert
March 17, 2025

By having your code or part of your code in a try catch block, if an error is detected it will throw an error and stop the code. I don’t know if this will work with pop-ups though. But say you have an array with your files that you want to process, then you use a try catch block to open them or what ever, and if it doesn't throw an error, the file is put into a new array, otherwise it is not put in that array.