Skip to main content
Inspiring
April 22, 2021
Answered

How to use photoshop with a script dialog opened

  • April 22, 2021
  • 2 replies
  • 1704 views

Hi, I am trying to write a JS script for PS. It starts without any document open:

  1. it shows a dialog with a file selection and a multiline text box
  2. after pressing a button the text is parsed in a way that x1 lines are associated to file1, x2 lines to file2, etc
  3. it opens file1 and shows a new dialog with the list of lines associated to file1
  4. with the dialog open I draw some levels for placing the text and I need to keep the text as reference because I need to place the elements accordingly to the number and the order of lines
  5. I press a button on the dialog, it does some stuff, save&close the file and pass to the next

My problem is the point 4, with an open dialog I can't edit the psd I open. Is there a way to edit my files without ending the script? I also tried the other type of window, the panel, I don't know why but if I launch it, it is immediately closed. Thank you.

This topic has been closed for replies.
Correct answer JJMack

Photoshop scripting does not have Palette windows support.  A script can display a progress window or a Dialog window. When you show a dialog windows Photoshop ScriptUI opens the interactive dialog window and wait for the user to use the dialog features. Your script can have function triggered by clicks, by changes by sliders etc. But basically  with a script dialog window open ScriptUI  is actively waiting  for the user to use some feature of the dialog. Your Script passed control to ScriptUi with show dialog. Your script is waiting for the show to be over and return control. The user can not use Photoshop UI. Photoshop passed control to your script. Photoshop responds only to your script commands till it terminated

2 replies

JJMack
Community Expert
JJMackCommunity ExpertCorrect answer
Community Expert
April 22, 2021

Photoshop scripting does not have Palette windows support.  A script can display a progress window or a Dialog window. When you show a dialog windows Photoshop ScriptUI opens the interactive dialog window and wait for the user to use the dialog features. Your script can have function triggered by clicks, by changes by sliders etc. But basically  with a script dialog window open ScriptUI  is actively waiting  for the user to use some feature of the dialog. Your Script passed control to ScriptUi with show dialog. Your script is waiting for the show to be over and return control. The user can not use Photoshop UI. Photoshop passed control to your script. Photoshop responds only to your script commands till it terminated

JJMack
Ripper346Author
Inspiring
April 23, 2021

I see, that's a bummer. I will looking for another way to do it. Thank you.

Legend
April 23, 2021

I gave you a link to a thread that discussed a similar question. There is no problem to use palette mode via bridgeTalk.