Summer is the ideal time to deepen your knowledge of InDesign scripting, isn't it? In this new episode of our roundup series we will investigate Page objects, style groups, and a nice selection of practical snippets. Feel free to grab and share the good stuff…
Tag : JavaScript
InDesign Scripting Forum Roundup #8
August 10, 2015 | Snippets | en
Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 2
May 20, 2015 | Tips | en
In my previous post I introduced some key concepts and tools for benchmarking Array.sort() and took you through the “standard model” of optimizing the callback function. We also emphasized that, of course, it is impossible to go faster than the native method. If these clues made you sit up and take notice, it's time to go one step further…
Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 1
May 13, 2015 | Tips | en
The pattern array.sort(compareFunc) is widely used by JavaScript programmers when elements being sorted are not supposed to represent basic strings in the sense of UTF16 ordered character sequences. In particular, sorting numbers forces you to provide that stupid custom compareNumbers routine which, in most cases, just looks like function(x,y){return x-y}. And even when you have to sort actual strings, there are countless situations where the default Unicode code point order is inappropriate. But a question arises: what is the performance cost of using a non-native comparison routine?
InDesign Scripting Forum Roundup #7
February 20, 2015 | Snippets | en
Do you want to stretch your InDesign-scripting power? Check out the new episode of the ISFR series and improve your skills in managing text, characters, styles, page items, events… in an automated manner.
InDesign Scripting Forum Roundup #6
June 19, 2014 | Snippets | en
Just by chance, the new episode of our ISFR series focuses on two topics often considered the most complex in InDesign scripting: page coordinates on the one hand, tables and cells on the other. Here are some enlightening discussions in these areas…
ExtendScript Core Entities Diagram
Exploring the prototypal relationships between basic ExtendScript's entities reveals an interesting network of hidden objects. The following diagram shows that ExtendScript's own implementation of JavaScript is deeply connected with a root function (referred to as [[Function]] in the figure) which provides the actual prototype—that is, the __proto__ property—of many visible objects, including Function and Object themselves…
InDesign Scripting Forum Roundup #5
December 12, 2013 | Snippets | en
As pointed out by Davide Barranca in his recent Open Letter to (Adobe) Devs scripting resources appear very sparse on the Internet. At some level, this ISFR series is an attempt to keep interesting codes, snippets, and knowledge visible to InDesign scripters, from various discussions I have participated in during the last months. Let's get to the heart of the matter…
So What's New in InDesign CC Scripting DOM
June 18, 2013 | Extras | en
Considering the size of the PDF, below, you could think that InDesign CC offers plenty of new features. But that's just an optical illusion! In fact, the vast majority of members introduced into the Scripting DOM regard QR Code's API, which is based on the recurring methods createEmailQRCode(), createHyperlinkQRCode(), createPlainTextQRCode(), createTextMsgQRCode(), and createVCardQRCode().
Apart from that a very small number of innovations is identifiable in the scripting area of InDesign CC—most are relative to look-and-feel and EPUB Export options. What is not highlighted here, however, is the fact that many ScriptUI features are now broken, or partially locked. The new InDesign skin subsystem introduces drastic limitations in the way scripters can customize oldschool user interfaces. For example, ScriptUI fonts do not seem to be supported anymore, and many event types or listeners (focus, onDraw…) are quite defective for various widgets. Also, FlashPlayer embedding leads to critical issues—as it has been reported that invokePlayerFunction() just does not work anymore. In short: very bad news for InDesign developers!
• See also:
— “So What's New in InDesign CS6 Scripting DOM”
— “So What's New in InDesign CS5.5 Scripting DOM”
— “So What's New in InDesign CS5 Scripting DOM”
InDesign Scripting Forum Roundup #4
May 14, 2013 | Snippets | en
Welcome in the new episode of the Scripting Forum Roundup series. Today I decided to focus on solid tricks and in-depth topics that might be of interest to experienced script developers…
Meet Loïc Aigon, Automation Expert!
February 11, 2013 | Extras | en | fr
My colleague Loïc Aigon recently updated his professional website: loicaigon.com. I take this opportunity to let him unveil axis and motions of a misknown job: automation expert…

Making String.split() support U+0000 in ExtendScript CS4
January 31, 2013 | Tips | en
For obscure reasons ExtendScript 3.x is somewhat allergic to the character "\x00" (U+0000). Some String and RegExp routines become silently defective as soon as your source string contains one or more NUL character. Although most of these bugs have been fixed in CS5 (ExtendScript 4.1), this still leads to compatibility and portability issues. Here is a snippet that allows to split any string and get proper results in all versions.
140+ InDesign and Creative Tasks You Didn't Know You Could Automate
January 05, 2013 | Extras | en
New tools, new solutions, new ideas, emerge every day for and from InDesign and Creative Suite heroes. But strangely enough, most graphic designers and InDesign end-users still ignore—or cannot measure—the power of automation. As a kind of proof of concept I decided to start the year with a celebration of the most noticeable scripts, tools and resources that have shaken 2012 in this area. Since I use Twitter as a bookmarking platform, it seemed fun to compile a selection of links I've tweeted or re-tweeted during the last 12 months. This is also an opportunity to pay tribute to my colleagues, scripters, developers, trainers, and time-savers! Now make yourself comfortable and enter in the Productive Dome…
How to Augment and Process Nested Groups (CS4-CS6)
October 22, 2012 | Tips | en
Dealing with groups is a major headache for InDesign scripters. On one hand, the Group object has no injection method to offer, which makes difficult to append existing page items into a given group. On the other hand, although the Groups API exposes a promising add() method, nobody has ever managed to use this feature from any PageItem.groups area, so we seem doomed to perpetually rebuild groups from scratch.
InDesign Scripting Forum Roundup #3
July 19, 2012 | Snippets | en
Here is the third episode of the Scripting Forum Roundup(s), a selection of 18 recommended discussions and sample codes which I have contributed to over the last six months. Enjoy!
So What's New in InDesign CS6 Scripting DOM
June 06, 2012 | Extras | en
InDesign CS6 is full of new features, which explains the size (98 pages) of the Object Members part in our tracking-change PDF below. Of course many additions regard interactivity, form behaviors and the related events. The Scripting DOM now includes the following ubiquitous collections: checkBoxes, comboBoxes, listBoxes, radioButtons, signatureFields, textBoxes. A number of existing objects have been extended accordingly.
Besides, there are many interesting additions to discover and experiment. Have fun!
• See also:
— “So What's New in InDesign CS5.5 Scripting DOM”
— “So What's New in InDesign CS5 Scripting DOM”
InDesign Scripting Forum Roundup #2
December 26, 2011 | Snippets | en
As opened in the “InDesign Scripting Forum: 25 ‘sticky’ posts” article, I will regularly feed this section with recommended discussions and/or snippets which I have contributed to through the ID Scripting Forum. Here is the scripting stuff I found specially interesting over the last six months…
Notes on ‘fastEntireScript’ Undo Mode
August 22, 2011 | Tips | en
In April 2009, Thomas Silkjær reported a bug on app.doScript that alters the ‘undo’ feature in InDesign. Although this issue has been fixed in CS5, there are still some pitfalls to beware of when you want to speed up your script through fastEntireScript…
Comparing the Performance of ExtendScript Snippets
June 23, 2011 | Tips | en
Although jsPerf is a very effective tool in a pure JavaScript environment, you may want to benchmark competing code snippets in the specific ExtendScript field. Here is a simple way to test and improve your InDesign scripted functions…
Permutation d'objets dans InDesign (miniscript)
April 19, 2011 | Tips | fr
Non sans témérité, Stéphane Baril et David Deraedt nous ont récemment accueillis sur le plateau de Chips & Tips, la célèbre série d'Adobe TV dédiée à la diététique productivité. Au détour de cet épisode, Loïc Aigon et votre serviteur proposons une sorte de préambule aux techniques d'automatisation et de scripting dans la Creative Suite, avec quelques illustrations simples et directement accessibles aux néophytes. Vous y découvrirez notamment la version embryonnaire du script SwapItems utilisé pour permuter des objets dans une maquette InDesign…
« previous entries - Page 2 of 3 - next entries »



