8 Replies Latest reply on May 29, 2014 3:57 AM by Trevorׅ

    Trusted Source

    EliotHarper
      I need to execute a JavaScript outside of the scripts panel, triggered by another process. Each time I run the script, I receive the message:
      >You are about to run a script in InDesign CS3. You should only run scripts from a trusted source. Do you want to run the script? [yes/no]

      Where is a "trusted source" in Windows so I can run scripts without this manual click-through alert?

      I've tried dropping it in ..\Adobe InDesign CS3\Scripts\ and ..\Scripts Panel\ directories, but that doesn't work. I note that there's a trusted location for Photoshop scripts: C:\Documents and Settings\Administrator\My Documents\Adobe Scripts (refer to http://www.adobeforums.com/webx/.59b55b6d), but this does not work for InDesign scripts. Any ideas?
        • 1. Re: Trusted Source
          Level 1
          I think "truested source" mean "you know what script will do" ;)

          robin

          --
          www.adobescripts.com
          • 2. Re: Trusted Source
            Level 1
            Eliot,

            I've never thought about this. It is specifically caused by the:

            #target indesign

            statement. But if you leave that out instead of running the script will just open in ESTK (as you probably know).

            What form does this external process take? Are we talking Mac or Windows? If Mac and the process can issue Apple Events (or whatever they're called), you should be able to tell InDesign to run the script and that would get around the problem.

            Dave
            • 3. Re: Trusted Source
              Does anybody know how to run a script in Indesign CS3 from an external process on a MAC without getting the message:
              You are about to run a script in Adobe InDesign CS3. You should only run scripts from a trusted source.

              Do I have to place the script in a certain folder to make it trusted?

              Paul
              • 4. Re: Trusted Source
                EliotHarper Level 1
                Hi, I assumed "trusted source" means the same as Photoshop, meaning a trusted location (e.g. the application Scripts directory). I'm calling the JavaScript from an application that I've written in PHP and running locally on my workstation. I'm using PHP as I need the application to perform other functions (create text files for import by the script, etc), before I can run the script. Here is the command that I'm executing from the command line:
                >"C:\Program Files\Adobe\Adobe Utilities\ExtendScript Toolkit 2\ExtendScript Toolkit 2.exe" -run "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/production/script.jsx"

                If there's another method of calling the script that won't invoke the dialog, then I'd like to find out.
                • 5. Re: Trusted Source
                  Level 1
                  From the ESTK CS4 ReadMe (accessible from the ESTK Help menu):

                  --------------------

                  2.2. Adobe Scripts Folder

                  On first launch, the ESTK creates a folder named Adobe Scripts in the user's Documents folder. This is the folder whose contents the Default favorite in the Scripts panel displays.

                  When double-clicking a JSX file, the ESTK normally acts as an invisible security filter. Before actually launching the file, a security dialog pops up asking if it is OK to execute the script. The ESTK treats the user's Documents/Adobe Scripts folder as a trusted location. When you double-click a JSX file in that folder, the Toolkit does not display the security alert.

                  --------------------

                  This suggests that the same folder should work for all Suite applications that are scriptable with ExtendScript.

                  Dave
                  • 6. Re: Trusted Source
                    Level 1
                    Hi Eliot, Dave,

                    Another approach would be to have a platform script (i.e., VBScript or AppleScript) run the script using the do script method. That way, it doesn't matter where the script is.

                    Thanks,

                    Ole
                    • 7. Re: Trusted Source
                      EliotHarper Level 1
                      Thanks Ole and Dave,

                      Dave's suggestion did the trick. I dropped the script in My Documents\Adobe Scripts\ and it runs without the prompt. I tried this earlier, but I incorrectly dropped it in the administrator user folder, not the user folder of the logged in user.

                      Thanks again!

                      Eliot
                      • 8. Re: Re: Trusted Source
                        Trevorׅ Adobe Community Professional

                        Hi Ole and All,

                         

                        A bit of an old post. Dave's Adobe Script trusted location works well but using Olav's DoScript solution with vbs is not working on Windows 7

                         

                        myInDesign.DoScript "c:\myScript.js", idScriptLanguage.idJavaScript
                        

                         

                        Throws an the following error message

                        Error: Object required: 'idScriptLanguage' Code: 800A01A8

                        I have tried running Indesign with administrative privileges but it doesn't help.

                         

                        Any Idea or has DoScript become DoNotDoScript?

                         

                        Regards

                         

                        Trevor