Skip to main content
கற_பன___Imagine_
Inspiring
December 16, 2011
Answered

session engine problem in jsxbin

  • December 16, 2011
  • 2 replies
  • 2693 views

Hi All,

I've created the UI script - window type "palette",  while run the script (.jsx format) from the InDesign Script panel, my palette visible to me.  If i convert the script from .jsx to .jsxbin format, place the binary file in InDesign script panel folder then  run the script (.jsxbin format) the palette visible and immediately hidden.

I couldn't able to identify where the memory leaks occured ?

Test case code:

#target indesign

#targetengine testsession

var myWindow = new Window ("palette", "Form");

var myInputGroup = myWindow.add ("group");

myInputGroup.add ("statictext", undefined, "Name:");

var myText = myInputGroup.add ("edittext", undefined, "Hello World!");

myText.characters = 20;

myText.active = true;

var myButtonGroup = myWindow.add ("group");

myButtonGroup.alignment = "right";

myWindow.show ();

Thanks in advance.

Imagine

This topic has been closed for replies.
Correct answer tomaxxi

Hey Imagine,

Well. It's little bit tricky with palettes.

What you have to do is to put jsxbin inside new jsx and cover it

into app.doScript and add session on the beginning.

It will look like this:

#targetengine "testsession"

app.doScript("@JSXBIN@ES@2.0@MyBbyBnANMXby.........");

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

2 replies

tomaxxi
tomaxxiCorrect answer
Inspiring
December 16, 2011

Hey Imagine,

Well. It's little bit tricky with palettes.

What you have to do is to put jsxbin inside new jsx and cover it

into app.doScript and add session on the beginning.

It will look like this:

#targetengine "testsession"

app.doScript("@JSXBIN@ES@2.0@MyBbyBnANMXby.........");

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Harbs.
Legend
December 17, 2011

Just a quick addendum:

If you want it to work in CS3, you'll need to use eval:

#targetengine "testsession"

eval("@JSXBIN@ES@1.0@MyBbyBnANMXby.........");

Harbs

csm_phil
Legend
December 16, 2011

Hi Imagine,

Please use this JS line. i have modified the pallete to dialog

    var myWindow = new Window ("dialog", "Form");

thx

csm_phil

கற_பன___Imagine_
Inspiring
December 16, 2011

Hi csm,

Thanks for the reply,  but i required the Palette window,  because we didn't able to open application when the dialogs are opened in InDesign.  so that i used the palette.

csm_phil
Legend
December 16, 2011

Hi Imagine,

Okay fine, you can use the Marijan Method its working well.

thx

csm_phil