4 Replies Latest reply on Jul 28, 2009 5:05 AM by Loic.Aigon

    [JS CS3] BridgeTalk : bt.body = x.toSource() vs a bt.body = a String

    Loic.Aigon Adobe Community Professional

      Hi,

      I found a script on this page

      http://d.hatena.ne.jp/kamiseto/

       

      The author uses this line :

      bt.body = toInDesign.toSource()+"("+contents.toSource()+","+gb.toSource()+","+kumi.toSource()+");";

      I tried to use this syntax and my script didn't produce any result.

      I found another approach based on an old Harbs's post. The syntax is like :
      theScript = "...";
      theScript += "...";
      bt.body = theScript;
      And it runs well.

      However, as I don't like to saty ignorant, what is the reason of the toSource() error ?

      Thanks in advance for explanation.

      Loic