10 Replies Latest reply on Jun 4, 2010 12:25 AM by Harbs.

    doScript in other programs

    Harbs. Level 6

      I do very little work in Photosop and Illustrator.

       

      Is there an equivalent to doScript in those programs? A quick scan of the DOM did not reveal anything useful...

       

      Harbs

        • 1. Re: doScript in other programs
          Dirk Becker Level 4

          I don't know - better ask in the respective forums.

          Dependent on your use case, I'd also have a deeper look at BridgeTalk.

           

          Dirk

          • 2. Re: doScript in other programs
            Kasyan Servetsky Level 5

            No, there isn't. As a workaround, you can send a script from Photoshop/Illustrator to InDesign via BridgeTalk and run doScript from there.

             

            Kasyan

            • 3. Re: doScript in other programs
              Harbs. Level 6

              Thanks guys.

               

              I wanted to make sure I didn't miss anything obvious before I start brainstorming...

               

              Harbs

              • 4. Re: doScript in other programs
                Muppet Mark-QAl63s Level 4

                A quick outline… of my findings

                 

                Id has:

                doScript() given language JS, AS, VB as you already know.

                 

                Ai has:

                do javaScript with arguments from either AS or VB but NOT the other way.

                AS & VB can play out recorded actions with do action but JS cannot.

                No ScriptListener plug-in.

                 

                Ps has;

                do javaScript with arguments from either AS or VB but NOT the other way.

                JS, AS & VB can play out recorded actions.

                ScriptListener plug-in that records action manager or VB code.

                a batch command.

                CS4 & 5 have app.system() to command line (not listed in documentation)

                 

                Br is JS only and also has app.system()

                1 person found this helpful
                • 5. Re: doScript in other programs
                  Harbs. Level 6

                  Hi Mark,

                   

                  So JS launching JS is a no-go (without using BrindgeTalk or what-have-you). Right?

                   

                  Harbs

                  • 6. Re: doScript in other programs
                    Muppet Mark-QAl63s Level 4

                    Harbs, Im working with well out of date software. I've never tried File.execute() to see if that works, I don't think that you are going to be able to pass any info? In the CS2 version there was a whole host of scripts that resided in the startup folder of app support (Adobe stuff). In ESTK each app had a listing of addition functions for cross app communication. Execute script from File, Place File etc. If I recall correctly almost all of this was done via BridgeTalk messaging. Reading the file, eval send message etc. I got way out of my depth very quickly but they may provide some clues or a starting point for you. You may have to dig about as I don't think newer cs versions come with any of this installed? BridgeTalk I find tough I can get file objects and functions thru but the back & fourth info no but things are better now than my in my version. I cheat and go back to applescript just so's I can get it done for now…

                    • 7. Re: doScript in other programs
                      sstanleyau Level 4

                      > ScriptListener plug-in that records action manager or VB code.

                      It looks like javascript code to me...
                      • 8. Re: doScript in other programs
                        sstanleyau Level 4

                        Bridge also has "do javascript" from AS.

                         

                        From a speed point of view in AppleScript, a similar speed-up happens in AI if the script is declared a script object and "run script" is used. Nothing speeds up Photoshop...

                        • 9. Re: doScript in other programs
                          Dirk Becker Level 4

                          Harbs wrote

                           

                          > So JS launching JS is a no-go (without using BrindgeTalk or what-have-you). Right?

                           

                          Harbs, what are you trying to achieve? ExtendScript has $.evalFile(), so that should be available cross application ...

                           

                          With InDesign you'd only use doScript to cross language borders or to have those side effects on undo history.

                           

                          Dirk

                          • 10. Re: doScript in other programs
                            Harbs. Level 6

                            Hi Dirk,

                             

                            Ah, yes. Good old eval...

                             

                            That's the obvious answer I was missing!

                             

                            Excellent!

                             

                            Harbs