11 Replies Latest reply on Oct 1, 2010 4:44 AM by Marijan Tompa [tomaxxi]

    [CS5 - JS] What's up with jsxbin?

    Emanuele Radaelli Level 1

      Hi guys,

      I did this script for a client.

      The script opens a dialog-window to set some options and control how actions are performed on opened files.

      I usually give clients the jsx file but this time I want to give him a jsxbin in order to hide the code.

      The problem is that when I launch the script as a jsxbin file from Script panel in ID the dialog-window is created then closed immediately.

      Obviously this don't happen with the jsx file.


      This is how I build my dialog:


      dlg = new Window("palette", "ID Script Beta");

      dlg.preferredSize = [500, 200];



      I tried the closeButton trick but it didn't work...

      I also initialize a dedicated engine at the beginning of the script:


      #targetengine "IDScriptBeta";


      Any suggestion?


      P.S. I have to use the Palette mode when building the dialog because I need it to be active while actions are prformed on documents.