Indiscripts

Automating InDesign since 2009

Tag : ExtendScript

Private Investigation into Style Overrides

Myths and facts about text formatting overrides in InDesign…

Continue reading...

Built-In String Features in IdExtenso

If you are one of the happy users of the IdExtenso scripting framework for InDesign, you may have noticed — or overlooked! — that this enhanced version of ExtendScript provides many additional services, including in the primitive areas of the language. For example, any string immediately has functionalities like trim(), codePointAt(), toUTF8(), which aren't available in the root syntax. Let's take a closer look at this toolbox…

Continue reading...

Scripting: How to Position InDesign Guides

Now, can you tell what X and Y are?InDesign guides are funny creatures. Whether or not they are assigned to a page via the fitToPage property, they remain firmly anchored to the geometry of the spread they belong to. The most mysterious thing is their location attribute, which does not obey all the principles ordinarily weighing on rulers coordinates. This article explores how to determine correct positions in all scenarios…

Continue reading...

What's New in IdExtenso 2.31008

IdExtenso: ExtendScript Framework for InDesign Ninjas

Continue reading...

« Optimiser InDesign pour les documents longs »

Optimiser InDesign pour les documents longs (avec les scripts et le GREP), par Laurent TournierUn nouveau livre-arsenal de Laurent Tournier vient de paraître : Optimiser InDesign pour les documents longs — Avec les scripts et le GREP. Si vous pensiez à une aimable mise en jambes agrémentée de quelques points de doctrine, vous êtes loin du compte ! Le PDF que l'auteur nous a communiqué en primeur recense plus de 200 scripts du monde entier, tous testés en situation, et le même volume de commandes GREP couvrant les problématiques les plus étendues. L'idée était déjà géniale en soi, mais la mise en œuvre, par sa densité et sa précision, fait tomber à la renverse…

Continue reading...

Meet Kasyan Servetsky, InDesign Wizard!

At the same time graphic designer, illustrator, prepress expert and scripting guru, Kasyan Servetsky has become one of the most active resource sharers in our microcosm. The InDesign community knows him well (but not enough for my taste!) because of the dozens of great utilities he has created over the past two decades: converters, batch processors, link managers, image resizers, font collectors, and many other gems. Let's step into the lab of this productivity freak…

Continue reading...

15 InDesign Scripts and Snippets You May Have Missed

Indiscripts Goodies are available on GitHub too!If you visit this website from time to time, you know that it contains a plethora of free InDesign scripts, but you may not know that other cool nuggets are regularly open-sourced in our GitHub repository called IdGoodies. The latter being hardly documented, here is an overview of some scripts—and interesting code snippets—you will find there…

Continue reading...

The Hard Problem of Quantified Alternatives in ExtendScript

In most cases, ExtendScript regular expressions cannot digest the (a|b)+ scheme. This bug is not new, but it's worth defining its symptoms and extent. This article presents a very simple problem, with no known solution to date…

Continue reading...

Porting your InDesign Script into IdExtenso — Step 5

In this episode we seriously improve the relationship between user settings and user interface. As a result, we get a smart InDesign script that both remembers the choices the user made within the session and adapts to the context, that is, whether the script should target the selection or a larger scope…

Continue reading...

Porting your InDesign Script into IdExtenso — Step 4

The previous episode dealt with modularity in IdExtenso, now is the time to take full advantage of it! Today we will see how to add a dialog interacting with user options. You will be amazed at how quickly this component fits into the script…

Continue reading...

Porting your InDesign Script into IdExtenso — Step 3

In this episode, you will learn how to arrange your code so that it fits into IdExtenso's “modular space.” Modularity is a key term when it comes to maintaining a large-scale project. Even if our sample script is not in itself of pharaonic complexity, we will transform it, as an exercise, into a pure module…

Continue reading...

Porting your InDesign Script into IdExtenso — Step 2

Today we will embed in IdExtenso the code we prepared in the previous episode. That's of course an important move, especially when you perform it for the very first time (since then you need to install the framework.) But you will discover in what follows the immediate advantages that $$ offers you…

Continue reading...

Porting your InDesign Script into IdExtenso — Step 1

So, you have the root idea and a basic code for your next InDesign script. All is fine. It works so well that you're now planning to release it, which opens additional questions: Will it work everywhere? How do I trace risky functions? What if I need to integrate new features later on? How do I deal with persistent user settings? How to add a basic interface? How will I localize the dialog in other languages? Can I make my script available in a dedicated menu? Will it work in a JSXBIN package as well? Can I obfuscate my code?…

Continue reading...

Page Range Formatter [UPDATE]

Given an unordered set of page numbers—e.g. {13, 9, 25, 12, 11, 8}—we often have to compute and output a range specification in the form "8-9; 11-13; 25". While this topic has been already discussed in the InDesign scripting forum, I'd like to explore today a slightly different approach…

Continue reading...

Drawing Sine Waves in InDesign [UPDATE]

Bézier curve approximation of sine waves

Computing Bézier curves that really look like sine waves is an exciting challenge for script developers. One needs to deal with both optimizing control points, transforming coordinate spaces and splitting curves. Here is a function that solves it all in ExtendScript for InDesign…

Continue reading...

Understanding the `count( )` Method

InDesign's scripting infrastructure is based on DOM objects (Document, Story, Paragraph…) and any such object has an associated collection (Documents, Stories, Paragraphs…). Collections typically arise in complex specifiers like myDocument.stories.everyItem().words. They also provide two essential members, the length property and the count() method. How do they differ?

Continue reading...

The Tricky Side of `string.replace( )` in ExtendScript

When you invoke myString.replace(...) in pure JavaScript, the “string being examined” is and remains myString during the whole operation. ExtendScript offers a slightly different mechanism that may unexpectedly alter the output string…

Continue reading...

What's New in IdExtenso 2.00601

IdExtenso: ExtendScript Framework for InDesign Ninjas

Continue reading...

Why You Should Never Use `x==null` in ExtendScript

The Japanese scripter あるふぁ found a bug affecting any ExtendScript code based on ...==null. This is not a critical issue (because experienced developers never use such condition!) but the case provides the opportunity to summarize important rules regarding falsey values and the equality operator…

Continue reading...

InDesign Scripting Forum Roundup #13

Here are nine useful InDesign scripts extracted from one year of debate in the scripting branch of forums.adobe.com. There are snippets for every taste—text, layout, graphics, geometry, UI—so take a look!

Continue reading...

- Page 1 of 3