9 Replies Latest reply on Jun 12, 2013 12:01 PM by pixxxel schubser

    special characters makes trouble with bridge talk in loaded script

    pixxxel schubser MVP & Adobe Community Professional

      Why is this so and what can I do?


      I use several scripts in Illustrator. Some of them I use in this way:



      Now I tried to built in two other scripts in the palette. In this scripts it is required to use special characters in variables. Standalone these scripts are work correct.

      Here is an simple example:


      // exampleScript.jsx
      var a = '\u201d'+" example "+'\u201d';


      I get this (correct) result:






      But when I call this example script with bridge talk:



      var scriptToLoad = new File(pathToScript + "/exampleScript.jsx");
      var win = new Window('palette', 'own palette');
      var btnSelect = win.add('button', undefined, 'example');
      btnSelect.onClick = function()
      {scriptToLoad.open("r"); var bt = new BridgeTalk;
      bt.target = "illustrator"; var script = scriptToLoad.read();
      scriptToLoad.close(); bt.body = script; bt.send();}


      Here is the same script and the wrong result:




      What can I do to fix this?