7 Replies Latest reply on Mar 30, 2011 6:33 PM by MarkPeterson01

    Shortcut for a Script


      How do you create a shortcut for a script? I'm not referring to a keyboard shortcut.

        • 1. Re: Shortcut for a Script
          John Hawkinson Level 5

          OK, but what are you referring to? A Windows Explorer filesystem shortcut?  The same way you create any other shortcut?

          • 2. Re: Shortcut for a Script
            MarkPeterson01 Level 1

            Hi John,


            I am referring to the physical location of the script.


            Here are some explanations of the shortcut:


            1. (From Dave Saunders)


            Consider Using Aliased Sub-folders


            Having scripts located physically inside the application folder can be somewhat inconvenient, particularly if you are a scripter, working on the scripts themselves, rather than just using them as tools. But even script users might be frustrated if they forget that the scripts are there and for some reason re-install InDesign, obliterating the Scripts folder in the process.


            While you could use an alias of the whole Scripts folder to work around this issue, I have found it better to work with aliased sub-folders. This allows me to keep my scripts in folders inside my Documents folder, while for some projects, I have a Scripts folder associated with the project itself for custom scripts that apply to just that project.



            2. (From page 4 of the InDesign CS3 Scripting Tutorial)


            You also can put aliases/shortcuts to scripts (or to folders containing scripts) in the Scripts Panel folder, and they will appear in the Scripts panel.



            3. Save the script as a text file with the file extension ".js" and put itor an alias/shortcut to itin the Scripts folder in the Presets folder inside your InDesign folder. Run the script from the Scripts palette.

            • 3. Re: Shortcut for a Script
              John Hawkinson Level 5

              Yes, that would be what I meant by a Windows Explorer shortcut.


              I'm confused about the question, though.


              Open windows explorer and navigate to the script. Select it. Right-click and choose "Create Shortcut." Is that what you were asking?

              • 4. Re: Shortcut for a Script
                MarkPeterson01 Level 1

                Hi John,


                My question involves the physical location of the script's code. I do not want to save the script code in the InDesign Scripting folder; I prefer to save the code in the project's subdirectory. It would be more efficient for me to save the JavaScript files in various locations on different drives.


                I tried your Windows Explorer shortcut idea, but there is no text box where I can enter the path to the file containing the JavaScript code.


                Do you store all of your script code in InDesign's Script subfolders?

                • 5. Re: Shortcut for a Script
                  John Hawkinson Level 5

                  I'm sorry, Mark, I'm not trying to be difficult. It seems like what youare asking is very straightforward, so I think perhaps I was looking for a more sutble question when the answer is easy.


                  You don't enter a text box. Save the script in your Project's directory. Open the Windows Explorer. Right-click on the script. Choose "Create shortcut." You will now have a file called "shortcut to scriptname.jsx" in the same directory. Move that shortcut to the InDesign Scripts/Scripts Panel directory. You are done!


                  We store our scripts in different ways. I wrote up a summary in my reply to [JS][CS3] Script deployment question two weeks ago...

                  • 6. Re: Shortcut for a Script
                    Marijan Tompa [tomaxxi] Level 4

                    Hey Mark,


                    I can suggest you to use InTools.com ScriptBay

                    http://in-tools.com/article/script-bay/script-panel-replacement-for-the-entire-creative-su ite/

                    You can add your custom folders and list scripts located in that folders.

                    Pretty easy and efficient!


                    Hope that helps.



                    Marijan (tomaxxi)



                    • 7. Re: Shortcut for a Script
                      MarkPeterson01 Level 1

                      Thanks, John. Thank you, Marijan for the suggestion. I currently use Dragon NaturallySpeaking's advanced scripting for automation. With a single voice command from a custom dialog, I can launch InDesign and run script(s) automatically.