4 Replies Latest reply: Aug 8, 2012 4:02 AM by Yanwen Ju RSS

    Trigger script from HTML

    diegomonzon Community Member

      How can I trigger an external script file located in the "Plug-ins/Panels/pannelName/content/panelName.asets/" folder , from an HTML inside my panel?

       

      What should the link look like?

       

      I found this thread http://forums.adobe.com/thread/663118 but this only works for the scrips folder inside photoshop ( Adobe Photoshop CS5 / Scripts)

       

      <a href="adobe://photoshop.cs5/Scripts/script's name">your link name</a>

       

      thanks in advanced

        • 1. Re: Trigger script from HTML
          zhpingw Community Member

          You can't do that, this is a limitation for security. (We assume only administrator can copy file to your photoshop folder.)

           

          But, if you own the panel, you may add some script to the panel's onInit event to copy your script file to photoshop's script folder.

           

          Or install the script file to photoshop folder manually.

          • 2. Re: Trigger script from HTML
            diegomonzon Community Member

            Thanks zhpingwfor your answer

            Is there a sample to copy the scripts inside my extension to the photoshop script folder automatically when I install it??

            that would be great too.

            Thanks Again

            • 3. Re: Trigger script from HTML
              cromaline Community Member

              You should :

               

              1 ) configure the mxi file adding:

              <file source="NameOf yourScript.jsx" destination="$scripts" file-type="ordinary" />

               

              between the tags <files> here   </files> 

               

              2) place the script file near the mxi file.

               

              3) package the extension to create the installer.

               

              This way the script file will be automatically placed inside photoshop script folder by the installer

              • 4. Re: Trigger script from HTML
                Yanwen Ju Adobe Employee

                Configurator 3.1 is already available for download at Adobe Labs. With this release, you can run your script file with HTML with the funciton _AdobeInvokeScriptFile(scriptFilePathRelativeToAssetsFolder);