2 Replies Latest reply on Aug 21, 2006 9:19 AM by (Dave_Saunders)

    Scripting InDesign Server

    Level 1
      I understand that when scripting the server, there is no such thing as an activeDocument, so app.activeDocument should be replaced with:

      app.documents[0].getElements()[0]

      if you want a resolved reference (app.documents[0] is usually good enough, though).

      But what happens to commands like:

      alert(Msg)

      and it's confirm() and prompt() brethren? Do these cause a message on the server thereby bringing things to a halt? Or is the server intercepting these and moving on?

      Is there a place a scripter can go to get information on what can or cannot be done on the server? Or should that be "what should or should not be done"?

      Dave
        • 1. Re: Scripting InDesign Server
          Level 1
          Hi Dave,

          There's a scripting guide and scripting reference that come with the server -- they're a little different than the desktop version... unfortunately the guide isn't quite different enough, so there's also 'trial and error'. :(

          Alert, confirm, etc... Adobe InDesign Server will supress these.
          Unfortunately they don't show up in the errorList so you don't have access to the supressed messages. If you do want the message to show up in the server console and to be available in the error list you can use these:
          app.consoleout(Msg);
          app.consoleerr(Msg);

          Paul
          • 2. Re: Scripting InDesign Server
            Level 1
            Thanks, Paul.

            I'll try to get my hands on the server guide and reference (I'm doing work for a client whose business centers on server-based solutions).

            Dave