Lightning Brain StylePainter for InDesign

Download

This is a free download. Before you can use the LB StylePainter Plug-In you also have to install our free APID ToolAssistant Plug-In, which is available as a second, separate download.

LB StylePainter supports InDesign CS, CS2 and CS3 on Mac or Windows.

Download the LB StylePainter Scripted Plugin (version 1.0.1 - Free download - does not include the APID ToolAssistant. Don't worry about the icon of the .spln file: it might not be a 'regular' icon, and that's OK)

Download APID ToolAssistant for InDesign (version 1.0.45 - Free)

You don't need to purchase a license for APID ToolAssistant (but we're always grateful if you do - it helps us fund further development). The LB StylePainter Plug-In will work fine with an unlicensed APID ToolAssistant.

To encourage us by purchasing the US$25 optional license, select the API - APID ToolAssistant... menu item, select the 'APID ToolAssistant' entry in the list, and click the Get License... button. Purchasing a license helps us fund further development of cool stuff!

If you don't purchase a license, APID ToolAssistant will show itself as 'Demo' for the first 20 days after it was first installed, and after the 20 days are up, it will change to 'Unlicensed'. Don't be alarmed by this. It will not stop working. LB StylePainter works with an unlicensed version of APID ToolAssistant, and purchasing a license is optional.

Let us know if this tool is useful to you, at pluginsupport@rorohiko.com. Thanks!

Goal

This tool allows you to search throughout a document for one or more GREP expressions, and 'paint' various style attributes onto matching areas of text. GREP is a standardized, powerful way to search and match text patterns.

This tool also works with InDesign CS and InDesign CS2 - bringing some GREP power to these older versions of InDesign.

The GREP definitions are all listed in a text frame (called the stylepainterframe) which resides on the pasteboard - this makes it easy to re-use and share the same GREP-based style list between multiple documents - simply copy the stylepainterframe between documents.

Example

Imagine you would like to assign a character style to all numbers that occur throughout a document. Install the software first, and then fire up InDesign and open the document.

1) Create a character style to your liking (e.g. it could be called AllNumbers or so and it could use a specific font with nice digits).

2) Create a text frame on the left hand pasteboard of the first page of the document.

3) In this frame, type a line with the following 3 characters

\d+

This is a GREP expression that matches all numeric strings of one or more digits.

4) Now the magic bit: select the GREP expression (i.e. \d+) and format it with the desired AllNumbers character style. The trick is that we link our desired formatting and style to a GREP expression by formatting the GREP expression itself.

5) Select the API - StylePainter - Paint Document menu item

If all goes well, all strings of one or more digits in your document will now have the AllNumbers character style applied to them.

Installing

Please make sure you have a copy of the APID ToolAssistant Plug-In installed.

Make sure you install the proper plug-in for your version of InDesign. InDesign CS, CS2 and CS3 Plug-Ins are mutually incompatible.

If you already have an APID ToolAssistant Plug-In installed (e.g. because you use one of our other Scripted Plug-Ins), make sure it is up-to-date.

APID ToolAssistant used to be called 'Active Page Item Runtime' - if you have any copies of Active Page Item Runtime or Active Page Item Developer installed, please remove them, and replace them with APID ToolAssistant.

When installing plug-ins make sure you copy plug-in files, not the folders they are contained in.

Copy the StylePainter.spln in the same folder as the APID ToolAssistant Plug-In you installed (typically that will be the InDesign Plug-Ins folder, or the Rorohiko subfolder of the InDesign Plug-Ins folder).

Don't worry about the icon of the .spln file: it might not be a 'regular' icon, and that's OK.

Also note that the StylePainter menu options will only appear after you open a first document; they become unavailable when no document is open.

StylePainter is free, and works with the free, unlicensed version of APID ToolAssistant. Purchasing a license for APID ToolAssistant is totally optional - purchasing a license is simply a way to offer us some encouragement.

If you don't purchase a license, APID ToolAssistant will show itself as 'Demo' for the first 20 days, and after the 20 days are up, it will change to 'Unlicensed'. Don't be alarmed by this. It will not stop working. StylePainter works with the unlicensed version of APID ToolAssistant, and purchasing a license is optional.

Usage

You can list as many GREP expressions as you want in the style painter frame on the pasteboard, one GREP expression per paragraph, and you can apply different attributes to each and every one of these GREP expressions.

StylePainter will work its way through your list of GREP expressions from top to bottom, and apply each GREP expression to the whole document in turn.

Check the sample grepstyles.indd document for a few slightly crazy examples.

It is possible that the pasteboard already contains some other text frames that might be confusing for the StylePainter. In that case you can 'mark' the stylepainterframe by giving it a script label.

Select the Window - Automation - Script Label menu item or the Window - Scripting - Script Label menu item (if necessary) to make the Script Label panel visible. Select the stylepainterframe, and type

stylepainterframe

in the Script Label panel (in one word, all lowercase. Be careful and avoid adding any whitespace). Then click somewhere else in the pasteboard area to deselect the stylepainterframe.

It is also possible to keep more than one stylepainterframe on the pasteboard all of which would need to have the proper script label.

If this happens, the StylePainter will pick the leftmost, uppermost stylepainterframe - so you can decide which of the stylepainterframe-s is 'active' simply by moving it leftmost, and highest on the pasteboard.

Version history:

18-May-2008 Version 1.0.1
- Improved style painting
- Adjusted ReadMe.txt to refer to APID ToolAssistant instead of Active Page Item Runtime.

18-April-2008 Version 1.0 Beta
- Initial Beta Release

Let us know if this Scripted Plug-In is useful to you, at pluginsupport@rorohiko.com. Thanks!

Back to the InDesign Plug-Ins page

Back to Home Page