Skip to main content
Participant
September 23, 2025
Answered

Preventing Multiple Dialog Windows in ExtendScript (Photoshop)

  • September 23, 2025
  • 1 reply
  • 81 views

Hello everyone,

I’ve written an ExtendScript panel for Photoshop that opens a custom dialog via File > Export > My Script. However, I’ve noticed that if a user clicks the menu item multiple times, it opens multiple instances of the same window.

I want to ensure only one instance of the dialog is open at a time—a common feature in many apps. For example, even in modded apps like [link removed] you typically can’t open the same chat window twice; it just brings the existing one to focus.

What’s the best practice in ExtendScript to achieve this? Should I use a global variable to check if the window exists, or is there a more robust method using window.find()?

Thanks for your help!