1 Reply Latest reply on Oct 21, 2016 8:30 AM by Silly-V

    Save in recent places with random name

    pearse_phillips Level 1

      I need some assistance with creating a script. I require a process that saves the current document in the last location ( on a mac I need it to save to the first location under the "recent places" drop down menu).

      Then it needs to save it as a a standard name with a random number attached to the end.

       

      So the steps being

      1- Save as.

      2- finder window locates the location under recent places.

      3- saves it as a standard name (eg "art file - ")

      4- amends a random number to the end of the name (eg: " art file - 03821920, "art file - 42942829", or "art file - 34324234")

      5 - saves file.

       

      I've had difficulty finding out where to begin with this process, I've done a bit of scripting on adobe in the past, but I'm a bit rusty. Any ideas, links or assistance in this would be great.

       

      Thank you so much for your help.

        • 1. Re: Save in recent places with random name
          Silly-V Adobe Community Professional

          I think if you have to mess with Finder, you have to probably employ the evil tool known as Applescript.

          If you can just get away with hard-coded or text-saved file path to show your script your desired save path, it would make such a script easier and confine it to the realm of just javascript.

          To do the random file number I usually do a simple time stamp new Date().getTime() or something. The great thing about getting time since the 1970s is not only hearkening back to an era when things were ultra-groovy, but also that this number will never repeat with every new millisecond that's added to the great book of Time. Namaste.