0

I would need a folder to be shared on the server and InDesign CS6 would need to load the scripts from that particular location.

Is this possible?

Totty.js
  • 15,563
  • 31
  • 103
  • 175

5 Answers5

1

If you just want to include other scripts in your script you can do this:

$.evalFile(new File(mainscriptloc + "/c/some/folder/central.jsx"));

It will load central.jsx into the executing script just like an "include" file.

bgmCoder
  • 6,205
  • 8
  • 58
  • 105
0

On a Mac? I found this solution useful:

http://tewha.net/2012/07/make-a-symbolic-link-from-finder/

0

We create links in the users individual scripts folders that link back to the actual script in the central repository on Windows. The downside is of course that users will reasonable often accidentally copy the actual script, rather than a link to the script - and then they miss out on future updates to the script.

Below is an example of a typical users 'scripts panel' folder. Each of the shown shortcuts point at a file in our central repository. enter image description here

When the user opens InDesign these shortcuts appear in their scripts panel the same way a regular script file would.

enter image description here

Anna Forrest
  • 1,711
  • 14
  • 21
  • added some pics - hope that explains it better – Anna Forrest Apr 18 '13 at 18:32
  • thanks (: that approach is interesting too, but I should change the links in each designer pc everytime I add a new one. What do you think about my approach in the other answer? – Totty.js Apr 19 '13 at 08:31
  • Yes, your users need to create a link each time you create a new script with my approach. And as mentioned, they have a tendency to copy the entire script not create a shortcut to it which also causes problems. I am only dealing with two users so I just make sure their PCs are set up properly. As for your approach, I don't follow it. My users don't want to know anything about the extendscript toolkit and I can't find any 'add favorite' option. – Anna Forrest Apr 19 '13 at 13:37
  • you have to open the script panel and on that panel there is a button on the top-right corner. You click on it and it will open a context menu, where you can add to favorite your custom folder. – Totty.js Apr 19 '13 at 17:42
0

The best way I found is to create a folder in any place you want your scripts to be (like a server) which is shared with all the users. Then to setup and run the scripts will be more tricky:

  • Open ExtendScript Toolkit
  • Open "Scripts" tab
  • Click on the top-right button and "Add Favorite"
  • Choose your path to the script and click ok
  • Now you can click on the drop down on the left and select "Favorites"
  • Click on the right drop down and click on your folder name
  • Double click on your script and run it

Now you are running scripts directly from the custom folder.

The startup script cannot be run from there... so it only works with scripts.

Totty.js
  • 15,563
  • 31
  • 103
  • 175
0

On a Mac, I suggest using symlinks (a special kind of OSX shortcut - go here for instructions and an Automator workflow download that will create one whenever you need it).

To create a shortcut, simply select the desired folder (recommended) or file located elsewhere on your computer/server and run the workflow (I suggest making a keyboard shortcut to the workflow as described in the instructions). Drag the shortcut created into your inDesign scripts folder and it will appear and operate exactly as the actual script or folder would in your Scripts Panel. Simply click on the link and inDesign will do the rest - you'll never know what you clicked is not the actual folder/file or that it's located elsewhere.

Note: if you create a shortcut to a script file rather than a folder, be sure to remove the extra text the workflow adds to the name (ie. when applied to "MyScript.jsx", the workflow will create a shortcut named "MyScript.jsx symlink". Remove the " symlink" part so inDesign will recognize the shortcut as a script file. Otherwise it will not run).

I've tested this with inDesign CC on my Mac and it works flawlessly.

Ziglen
  • 1
  • 2