FiddleScript: InDesign Scripting Simplified

Dealing with scripts can be a little daunting for a lot of users of InDesign. Once you get the hang of it, it’s not that hard, but you need to create files in the correct format, name them with the correct extension, and save them in the correct place. We’ve created a script which we hope will make life a lot easier.

FiddleScript — Your tool to fiddle with scripts (without having to fiddle too much).

Download the script from here.

If you are using CS4 or later, you can download the Extension Manager installer instead from here.

Compatibility:

FiddleScript is compatible with InDesign CS3 and higher.

Manual Installation:

  1. Download the zip file from here.
  2. Unzip the file.
  3. Place the resulting file (FiddleScript.jsxbin) in your Script Panel folder.
  • There is a Scripts Panel folder in your application folder, as well as your user data folder either one will work. If you want the script to be accessible by all users, make sure to put it in the main application folder.
  • For more information on how to locate your script folder, please read this help file here.

Extension Manager (CS4 or later) Installation:

  1. Download the .mxp file from here.
  2. Double-click on the file, and the Extension Manager will install the script into your main Scripts Panel folder.
  • The mxp installer file is designed to work with Adobe Extension Manager Versions CS4 or later. If you have other versions of Creative Suite products installed there is a possibility that your operating system may associate mxp files with an earlier version of the Extension Manager and will try to use that when you double-click the file. If that happens you will see an error alert similar to the one pictured below:

    If you do, make sure you use the “open with..” option (by right clicking on the file), and open with the correct version of Extension Manager (i.e. Extension Manager CS4).
  • Alternately, you can open the Extension Manager, and click Install as shown below.

Usage:

To run FiddleScript, double-click on the script in your Script Panel. This will bring up a dialog like the one shown:

  1. Copy the script code from wherever you got it, and paste the code into the text area.
  2. To see the results of the script, click Run Script. If you are using CS4, you will be able to undo the whole script in one step.
  3. If you are happy with your script, just click Save Script, type in a name, and your script will be saved to the Scripts Panel.

Some Quick Pointers on Using FiddleScript

  • You can click on Load Script to populate the text area with code from a saved script. This is great for making a quick edit on an existing script without ever leaving InDesign. When you are done editing, Just click on Save Script, and you can save it back to your Scripts Panel. You can use the same name to overwrite the original script, or choose a new one.
  • After saving a new script to the Scripts Panel, you will need to refresh the Scripts Panel display for it to become visible. To refresh the Panel display you can either close it and re-open it, or switch away from InDesign to another program, and back again.
  • The current script will be saved for subsequent runs of FiddleScript. This makes it easy to check the script (or run it numerous times), without having to paste the script into the dialog each time.
  • You cannot type a return or tab character into the text in FiddleScript’s dialog. If you need to type a return or tab, use the buttons at the top of the dialog.
  • FiddleScript can make your saved script undoable in one step in CS4 and later. To facilitate this, it can wrap your script in a function which can be run in CS4 and later as a single step. By default, the undo Name will be “Run Script”, but you can change it to whatever you want by replacing “Run Script” at the end of the wrapper to whatever you’d like it to be called.

    After Wrapped the Script in a Function

Tags: , ,

5 Comments

  1. Loic says:

    Hi,
    I did write too such a code editor interface.
    http://www.loicaigon.com/en/auto.php?goTo=2
    based on Marc Autret RunLabel script.
    It was nice to do but I found that the text field is not a great element to write code.
    As I see, you also needed to add buttons for TAB ad Carriage returns as these commands aren’t taken in account on Windows. I did’nt think about using buttons but it’s nice.
    PS: on Mac, Don’t tab and CR work with keyboard on the field ? I believed so.
    However your UI is sexier 😉
    Loic

  2. Harbs says:

    @Loic,

    Sorry, I did not remember your script when I wrote this. My consolation is that at least I added an extra few features… 😉

    No, tab and return does not work on Mac…

    Maybe one day when I have time, I will do this as a PatchPanel project, which would be nicer…

  3. Loic says:

    “Maybe one day when I have time, I will do this as a PatchPanel project, which would be nicer…”

    I am just starting digging into patchpanel but I have some difficulties to seize the limits of what you can do and what you can’t.
    But if it can allow tab and CR keying it will be yet a great step.
    Patchpanel experts are very rare :-S

  4. Loic says:

    “No, tab and return does not work on Mac…”
    Yeah I remenber now.
    On Mac, the script display two buttons like yours. Not on PC but I don’t really remenber why. I think that clicking on these buttons had no effect or produce unexpected results (tabs or CR were placed randomly).
    That’s why I had to go through but it’s not something I find convenient.
    But I haven’t been any further cause I wasn’t sure someone possibly used the script 😀
    Loic

  5. Peter Kahrel says:

    I too have struggled with this before, and have now just updated the problem’s description because it plagued one of my scripts.
    http://www.kahrel.plus.com/indesign/grep_editor.html
    look under “Some CS4 limitations”. Turns out that CS3 is no problem at all (not on Windows, anyway).

    Peter

Discuss this product