2 Replies Latest reply on Aug 17, 2014 2:19 PM by Mrtreebis

    InDesign script to log name and time?

    Mrtreebis

      Hi, I'm looking into ways of keeping track of each time an InDesign document is worked on. I was wondering if there was a script out there that could stamp a user name and time for each time the file is PDFd?

      I think ideally into a table of, say for arguments sake, 10 blank rows, which then gets populated with the info each time. Doesn't have to be a table though.

      I'm new to scripting, so don't know if this is possible or the best way to approach the problem, but any feedback would be appreciated!

       

      Many thanks in advance

        • 1. Re: InDesign script to log name and time?
          Jump_Over Level 5

          Hi,

           

          Is possible, i,e, this way:

          • create an empty string and store it by doc.insertLabel("your_key", "")
          • create an eventListener with an event "afterExport" as a trigger (Trevor switched the light on this)
          • create a code to run below after above action
          • capture user by $.getenv('username')      ==> Windows
          • capture time by new Date().toLocaleString()
          • compose all data as a newString;
          • update your string by newString = doc.extractLabel("your_key") + newString;
          • store captured data by doc.insertLabel("your_key", newString)

           

          • display it as a content of some textFrame (formatted or not) any time you need.

           

          Jarek

          PS. Suggest to change "Correct answer" for Trevor in your last post...

          • 2. Re: InDesign script to log name and time?
            Mrtreebis Level 1

            Hi Jump_Over, many thanks for the feedback - I'm an absolute novice at scripting, and wouldn't be able to put this together, without someone spelling it out for me though!