4 Replies Latest reply on Aug 10, 2015 12:02 AM by hubbas

    Reload scripts folder without restarting Photoshop

    hubbas

      Hi,

       

      Can't find any information about this. I have a symbolic link from the scripts folder to a git repo. I want to reload new scripts that have been pulled into folder without closing Photoshop.

       

      I have tried app.refresh() and

       

      function refresh () {

          var desc = new ActionDescriptor();

          desc.putEnumerated(charIDToTypeID("Stte"), charIDToTypeID("Stte"), charIDToTypeID("RdCm"));

          executeAction(charIDToTypeID("Wait"), desc, DialogModes.NO);

      }

       

      But neither does work.

       

      Is there a way to do this?

       

      Thanks!

        • 1. Re: Reload scripts folder without restarting Photoshop
          DBarranca Level 4

          Hi,

          I'm not sure it can be done (would be interesting, though): as far as I know the /Presets/Scripts folder is checked only when PS boots since its content is used to populate those menus which are controlled by <javascriptresource> tags (Filter, Script > Automate, etc).

          I've never heard about the possibility to refresh them - let's see if others can help.

          Regards

           

          Davide

          ---

          www.davidebarranca.com

          www.cs-extensions.com

          • 2. Re: Reload scripts folder without restarting Photoshop
            JJMack Most Valuable Participant

            I believe Photoshop scan all script during Photoshop start up build a list of script names for its menu Fils>Scripts>Script Name. That it also registes plug-in scripts and populates its about plug-in and script help info as Photoshop start up. I also link Photoshop Preset\Scripts folder to my photoshop script tree.   So I do not think any new script names can be put into Photoshop menu File>Script>Script Names while Photoshop is UP.   I edit Script in the list and test them all the time when Poptoshop is up and running.  New scripts I develop in my tree to test them while Photoshop is up. I drop them on Photoshop from Windows File explorer.   The next time I start Photoshop the new script I have added into my Photoshop Scripts tree will be in Photoshop's  Script list.    

            • 3. Re: Reload scripts folder without restarting Photoshop
              xbytor2 Level 4

              I only add script plugins to the Preset/Scripts folder. Everything else is in it's own CVS managed folder and accessed via an Action in an Action Set. Although not a straightforward process, you can generate an XML file for a folder of scripts, convert the XML file to a .atn file, and load the .atn file into PS.

              • 4. Re: Reload scripts folder without restarting Photoshop
                hubbas Level 1

                I guess this is the closest you can get to reload scripts in Photoshop. Thanks!