7 Replies Latest reply: May 9, 2011 12:15 PM by DBarranca RSS

    JSXBIN Syntax Error?

    nirkaufman Community Member

      hey,

      Im trying to convert  jsx file to jxcbin, and then embad it in a jsx script using: "app.doScript" without sucsses.. i tried the "eval" method but fail again.

      Before i export my jsx file to "bin" format, i removed the "#target photoshop" and all the line breaks.

      I just can't find the reason to the Syntax Error i get any time..

       

      What is the correct way to Prepare a JSX script to JSXCBIN? is there somthing else to "clean" exept the line-breaks?

      whice characters are not allowd in the jsx intend for jsxbin conversation?

       

      I really would appreciate help on this issue... I'm really frustrated

       

      Thanks!

        • 1. Re: JSXBIN Syntax Error?
          Michael L Hale Community Member

          "app.doScript" looks like it might be part of a BridgeTalk message. Is it? I have not needed to remove linebreaks when converting to jsxbin. But BridgeTalk messages can't have comments.

          • 2. Re: JSXBIN Syntax Error?
            nirkaufman Community Member

            The Script intendent for photoshop and not to bridge. I tried to remove the comments before the export to bin...

            when I try to run the script, ESTK stops and Highlight the code and the console return: "result:0"-( Check out the screenshoot )

            Screen-shot.jpg

            when i try to run the jsxbin script as is (without embad) its working fine. the problem is when i try to embad it in jsx file.

            where is the problem?

            Thanks

            • 3. Re: JSXBIN Syntax Error?
              Muppet Mark-QAl63s Community Member

              BridgeTalk is not Bridge the App although that could be a possible target. It is the ESTK's inter-app messaging system… There is NO app.doScript() in Photoshop that method is InDesign only. Where are you running the script from? Have you tried using $.fileEval()

              • 4. Re: JSXBIN Syntax Error?
                nirkaufman Community Member

                Thank you for the usefull information abour bridgetallk..

                 

                 

                Im not sure I know how to use eval, i tried this code before and failed:

                 

                 

                #target photoshop


                eval ("my jsxbin code goes here");

                 

                 

                 

                what is $.fileEval()??

                 

                THX

                • 5. Re: JSXBIN Syntax Error?
                  Muppet Mark-QAl63s Community Member

                  From the toolkit guide…

                   

                  $.evalFile (path[, timeout]) // Loads a JavaScript script file from disk, evaluates it, and returns the result of evaluation.

                  path: The name and location of the file.

                  timeout: Optional. A number of milliseconds to wait before returning undefined, if the script cannot be evaluated. Default is 10000 milliseconds.

                   

                  Do you not have the toolkit guide PDF? It covers all the inter-app, file system access, bridgetalk stuff including the $ object…

                   

                  Could you give an overview of what this script is intended to do and where you are calling it from?

                  • 6. Re: JSXBIN Syntax Error?
                    nirkaufman Community Member

                    Muppet Mark wrote:

                     


                    Do you not have the toolkit guide PDF? It covers all the inter-app, file system access, bridgetalk stuff including the $ object…

                     

                     

                    that one was missing... thank you!

                    i will be happy to share my script soon:)

                    • 7. Re: JSXBIN Syntax Error?
                      DBarranca Community Member

                      As a side note, if you export a binary code with, say, ESTK CS5, it will run properly in PS CS5 only.

                      If you need it to make it work with legacy versions, you have to use the older one, AFAIK (so for instance, I've been using ESTK 2.0.2.77 to export scripts that need to run from CS3 to CS5).

                      That said something like,

                       

                      eval("@JSXBIN@ES@1.0@MAbyBnARMhPbyBn0AEOhRbyhTn0ABJhTnASzFjUjVjSjCjPBEncfffACzChdhdCVB\
                      jGjlFnfJhInAdVgdyBFeGjDjBjOjDjFjMjidADgd40BiAkd4B0AiA2MB4C0AiAADANByB");
                      

                       

                      never gave me any trouble.

                      Cheers,

                       

                      Davide