Script launcher with history list

In InDesign you run a script by double-clicking its name in the Scripts panel. The trouble with that panel is that it shows just one column in tiny type. On my screen that means that I can see 47 scripts in the panel and I have to press my nose to the screen to be able to read their names. To see more scripts I need to scroll down the list, then click. All this is tedious.

Another thing is that of the many scripts in my script folder, in any session of work I use maybe half a dozen scripts often, so that it would be useful if these were grouped together dynamically -- in other words, a history list. And it would be useful if I could type the name of a script and while I type, the list is filtered to show only the scripts whose names match whatever I type.

Time, therefore, for a script launcher that filters the file list and that uses a history list that shows the last-run script on top of that history list.


The easiest way to use the script launcher is when you assign it to a keyboard shortcut. I have it assigned to F4, so when I want to run a script I press F4 for the script launcher.

The script displays a dialog with an entry field and a list. (The first time you run the script launcher there is no history list but it will create an empty one.) The script name displayed in the entry field and selected in the list (delete_graphics_alldocs.jsx in the screenshot) is the script that was last run. To run this script, just click Enter/Return or click Run.

script launcher screenshot

The history list contains up to 15 entries, which are listed in the box. The other scripts in scripts folder are listed below the history list, separated by a line.

To select another script, start typing its name until you see its name selected in the list box. For best results, check the Filter list box so that the list shows only the script names that match what you type. The list displays the names that contain what you type anywhere in the name, which is not necessarily from the start of the name. The script matches names case-insensitively. For more filtering options, see Pro trick, below.

Another way to run a script is to double-click it (as in InDesign's own Scripts panel). (This doesn't work in CC and later.) Finally, you can click a script's name in the list, then click OK or press Return/Enter to run it.

To have the script show the filtered list the next time you run it, check the Apply filter on next run box. Suppose I check the box with the script's interface as in the above screenshot and run the script; the next time I run runscript, I see the same filtered list. The script works as before: for example, to expand the list, simply press BackSpace and start typing to filter the list in a different way.

Editing a script

To edit a script, select it as described above and click Edit. This will launch Adobe's script editor, the ExtendScript Toolkit, and load the script in it. When you're done, save the script and exit the editor.

Show the script folder

Click Folder to display the content of the script folder. This is the equivalent of Reveal in Explorer/Finder in InDesign's Scripts panel.


Delete the selected script. Note that the list is not redrawn. Best to exit the script after deleting a script file and restarting the script.

Pro trick

You can filter the list a bit more specifically by using some special symbols. To show scripts whose names start with what you type, enter a circumflex at the beginning:

Example Comment
sort Show all scripts whose names contain sort
^sort Show all scripts whose names start with sort
sort\.jsx Show all scripts whose names end in sort

In other words, you can use a regular expression when you type a name.

Version history

18 Feb. 2017: (1) You can now use regular expressions to filter the script's list. E.g. ^sort shows the scripts whose names start with sort; see the text for details; (2) added a Folder button to show the content of the script folder. It's the equivalent of InDesign's Reveal in Explorer/Finder, and it's useful to have it handy in the script's interface.

October 2015: Rewrote the ageing script and added a delete button.

14 May 2015: Added the Edit button so that a script can be loaded in the ESTK quickly.

17 July 2011: Fixed compability problem with older history files.

27 June 2011: The script now works case-insensitively.

19 June 2011: Added a checkbox to the interface (Apply filter on next run) so that you can start the script with the previously filtered list.

10 May 2011: Added a filter on the displayed list.

14 Apr. 2011: The script shows a list box rather than a dropdown list, so that it's easier to see what is in the list and to select a script to run. A script can now also be run by double-clicking its name in the list.

ca. 2004: first posted.

Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please click the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Show script (right click, Save Link/Target As to download)

Back to script index

Installing and running scripts

Questions, comments? Get in touch