4 Replies Latest reply on Jul 14, 2016 2:27 PM by Chuck Uebele

    Question on deployment

    roby@inthenews

      Regarding one Javascript across multiple Computers

       

      Please bare with me, i am new D:

       

      I have made a script to speed up my workflow, and now it is being adopted by the entire team. Thing is, because

      every user has specific variable values,  every time i need to fix or update anything on it, i have to individually change

      things such as user name (for local folders) and so forth.

       

      I was wondering if there was a way to pass values to the java-script through the shortcut as you would with some programs. 

      (adding -(argument) under general  shortcut properties in windows)

      that way i can just have 1 script on the server, and have everyone run the same script,

      and pass their own arguments to it, rather than have everyone run their own version.

       

      Also, if there is an alternate way to achieve the same purpose, would thank you infinitely for any suggestions


      Thank you!

        • 1. Re: Question on deployment
          JJMack Most Valuable Participant

          Paramaters are usally obtained by scripts using a prompt  or a dialog.  However If you code the script as a Photoshop Plug-in the plug-in script can record dialog setting into an action step that the user sets recording an action.  If a user has  sets of prameters they want to use often then can record an action for each set of settings.  When they play the actions the setting will be passed to the scrpt by the action player. The Plug-in script will bypass displaying it dialog and use the settimgs passed by the action player.

           

          For example Adobe's Fit Image plug-in is A Photoshop script a JavaScript in your Photoshop folder \presets\scripts\Fit Image.jsx.  I have use Fit Image as a model for a couple of Plug-ins I wrote. Plug-in support was added to Scripting in Photoshop CS3.

          • 2. Re: Question on deployment
            DBarranca Level 4

            Hi,

            if what you need is Folder names you can use Folder tokens, like Folder.userData, Folder.myDocuments, etc.  – please find more information in the Javascript Tools guide PDF bundled with the ExtendScript Toolkit, page 56 and following..

            Regards,

             

            Davide Barranca

            • 3. Re: Question on deployment
              roby@inthenews Level 1

              thanks man, this is exactly what i needed.

              • 4. Re: Question on deployment
                Chuck Uebele Adobe Community Professional & MVP

                Where I used to work, I wrote a script that was used by many photographers. I created an XML file that saved all the UI variables to each persons private folder on their computer. This way they could save a variety of presets for processing different types of images. The trick is to use a recursive function and goes though all the elements of your UI and records the values, the other trick is to give each control that you want to record it's own variable name and then name that control the same thing. This way you can extract the name of the control and use that as your XML node name.