Skip to main content
October 11, 2006
Question

How to pass variables between applications?

  • October 11, 2006
  • 1 reply
  • 501 views
I am able to send fixed string from InDesign to Bridge like in my "sample 1", but not able to send variable like in "sample 2" (myDocName is the variable). How to solve this?

// sample 1
var bt = new BridgeTalk;
bt.target = "bridge";
bt.body = "var mydoc = 'MacintoshHD/MyFolder/Bot02.indt'; app.document.thumbnail = new Thumbnail(File(mydoc));"
bt.send();

// sample 2
var bt = new BridgeTalk;
bt.target = "bridge";
var myDocname = "MacintoshHD/MyFolder/Bot02.indt"
bt.body = "var mydoc = myDocname; app.document.thumbnail = new Thumbnail(File(myDocname));"
bt.send();

regards

Erkki
This topic has been closed for replies.

1 reply

srakete
Inspiring
March 18, 2008
Hi,
a little late, but try this:

bt.body = "var mydoc = " + "\"" + myDocname "\"";

Stefan