Tidy InDesign Scripts Folder

When installing scripts for InDesign, I don’t like to see this:

The issue is that the ‘main’ script is actually InDesignBrot.idjs, but it is buried in chaos, and the user would most probably not know what to do. The InDesign Scripts Panel also shows stuff my scripts need, but which has no relevance to the user of my scripts.

Instead, I want to see something like this (some more utilities thrown in for the sake of argument):

Each individual utility script has a subfolder below the User folder, and within those subfolders, the user sees only clickable scripts. No data files, no templates – just a clickable script.

This functionality is now part of the upcoming release of PluginInstaller.

The new release of PluginInstaller allows you, as the developer, to package scripts and their ‘satellite’ files into a single .tpkg file. It works for both .jsx (ExtendScript) and .idjs/.psjs (UXPScript) scripts.

At the user’s end, the user will use PluginInstaller to install the .tpkg file. Rather than creating a whole raft of files in the Scripts Panel folder, PluginInstaller will create just a ‘link’ to any clickable script files.

My first attempt for this feature was to use symlinks, but that approach has some serious drawbacks. If the actual script files are deleted, the symlinks become broken, and things turn to custard when the user double-clicks the broken entry on the Scripts Panel.

I’ve solved this by using ‘stub’ scripts instead of symlinks. The PluginInstaller will generate a small in-between stub script. When double-clicked, all this stub script will do is transfer control to the actual script, stored somewhere else, in a safe place.

If and when the actual script file is accidentally deleted, the stub script will bring up an error dialog with a clear explanation to the user (essentially: “This link is broken, please use PluginInstaller to re-install the missing script”).

When the user uses PluginInstaller to uninstall a script, the stub script will automatically be removed from the Scripts Panel.

Much cleaner!

If you find this helpful, make sure to give me a positive reaction on LinkedIn! I don’t use any other social media platforms. My LinkedIn account is here:

https://www.linkedin.com/in/kristiaan