8 Replies Latest reply on Jun 30, 2009 5:00 AM by Kath-H

    Where do the baby questions go?

    Kath-H Level 4

      Honest, I'd quietly search the FAQ if I could find one.

      Newbie, as in eyes barely open, no feathers or fur yet. Still using CS2 Mac (customer service, long story) - I've found and started using, with great delight, the basic scripts for ID CS2. My first question is, of the three sets of scripts, why would I use any particular set, Applescript, javascript etc? Using the Applescript ones so far with no problems.

      Thanks for your patience and forbearance

        • 1. Re: Where do the baby questions go?
          Thomas B. Nielsen Level 3

          For crossbrowser compatibility use JavaScript.


          If you need your script to interact with other programs or the OS, use the applescript for Mac, and VBscript for PC.

          If you dont know any of the languages, i would recomend you to start learning JavaScript, it's in my opinion the easiest language, and it's crossplatform caompatible.


          Have fun :-)

          1 person found this helpful
          • 2. Re: Where do the baby questions go?
            [Jongware] Most Valuable Participant

            Macs can use Javascript and Applescript, Windows can use Javascript and VBScript.


            The advantage of Applescript is that it interacts very good with the rest of the OS and with other programs, making some inter-application tricks possible that JS can't (and Windows can only dream of....). On the other hand, if you want to assert some platform independence (because, for instance, you have a multi-platform office setup, or you want to share scripts with as many users as possible), Javascript is the way to go. If you need heavy interaction with the Office range from Microsoft, VBS is unequalled.

            1 person found this helpful
            • 3. Re: Where do the baby questions go?
              Kath-H Level 4

              Thanks both. For now I'll just be splitting text frames off and non-interactive stuff like that. I can just about make sense of javascript from web design actions and Applescript looks vaguely like BASIC (I'm very old ) so I'm sure I'll learn to bash either about if needed. I'll stick with Applescript for now.

              OK, 2nd baby question. Sometimes people put a whole script into a forum answer in the ID forum. If I want to use this, and it's all on the page in front of me - how do I catch it and make it accessible to InDesign please?


              • 4. Re: Where do the baby questions go?
                [Jongware] Most Valuable Participant

                Copy and paste


                Be sure to use a plain text editor (nothing resembling Word, for example). There are a few text editors that helpfully convert your text to RTF or something like that; no good either! I think BBEdit is the Mac plain text editor of choice. For AppleScript, well, I guess you could use the default OSX Applescript editor, as it has syntax highlighting and all.


                Then save under a meaningful name in your scripts folder. Javascript needs a ".jsx" suffix, don't know about AppleScript... The quickest way to locate your scripts folder is to right-click any script in InDesign and choose "Open in Explorer/Finder".

                • 5. Re: Where do the baby questions go?
                  Kath-H Level 4

                  Thanks. I normally use Text Wrangler if I want plain, plain text. I've found a folder of example Applescripts (I'll stop bothering you soon and go away and learn more about this) - the files all end .scpt - should I use that?

                  • 6. Re: Where do the baby questions go?
                    [Jongware] Most Valuable Participant

                    I am a Windows and JS man, but that sounds about right.

                    • 7. Re: Where do the baby questions go?
                      Kasyan Servetsky Level 5

                      For writing Applescripts use either Script Editor or Script Debugger http://www.latenightsw.com/sd4/index.html. The last is much better and I insistently recommend you to use it.



                      • 8. Re: Where do the baby questions go?
                        Kath-H Level 4

                        I'll certainly at least get the trial. Thanks all, off to work things out for myself for a while.