PSJR Script executes on Dialog Close

aworonow

Well-known member
Hi, my first script is almost done...but a few bugs remain. One I need help on is the following:

If I have the dialog open, and make some changes in it (to values and image selections), then press the "X" in the upper right to close the dialog, the script executes using whatever partial or wrong settings it may have. How do I avoid this and just close the dialog and script cleanly? I suppose there is some "onDialogClose" or something followed by some type of clean-up?

Thanks...Alex
 
Hi aworonow,

you can check how the dialog was closed by checking for the return value of dialog.execute();

  • If the script was closed with the "X", the return value will be 0.
  • If it was closed with the ok function the return value will be 1.
I did not check for other possible return values.

Regards,
Ray
 
Back
Top