Skip to main content
Participant
December 15, 2009
Question

Script UI - Keeping Windows Open

  • December 15, 2009
  • 1 reply
  • 652 views

Hi all,

Does anyone know how to write javascript-generated Script UI windows that will stay open in Illustrator?

e.g.: Take one of the examples in Adobe Utilities\ExtendScript Toolkit CS4\SDK\Samples\javascript, such as "SnpCreateCheckBoxRadioButtons.jsx" (also attached). If you run this with target application="ExtendScript Toolkit", the generated window will stay on screen until closed (duh...). However, if you try to run it with illustrator, the window will immediately disappear.

It seems like the window is getting force-closed by illustrator when the script has finished executing, but why is the behaviour different between the two targets? And how on earth can you stop it from closing? I've searched high and low, and can't find any replies to this question. Please help me before I tear my hair out...

Thanks!

This topic has been closed for replies.

1 reply

Participant
December 15, 2009

Found it!

Just add

#targetengine illustrator

to the start of the file.

Why on earth isn't this mentioned anywhere in the documentation? I've got the Illustrator SDK + ExtendScript Toolkit, and there is not one mention of this issue.

Grrrrr.....