Indiscripts

Tag : JavaScripting

InDesign Scripting Forum Roundup #11

What's on the menu for this 11th episode? My personal selection of the most interesting, verbose, and technical discoveries that took place in the InDesign Scripting Forum within the last height months. Each topic (and code snippet!) will teach you something you probably didn't even suspect…

Continue reading...

IdExtenso: ExtendScript Framework for InDesign Ninjas

Driven by a mix of vanity and liberalness I decided to make public the building blocks of my InDesign scripting framework, which I called IdExtenso. The alpha release is now available on my GitHub account and will be regularly extended in the coming weeks and months…

Continue reading...

InDesign Scripting Forum Roundup #10

InDesign scripts may involve unexpectedly complicate solutions for addressing tasks that seemed initially quite easy, as well as unexpectedly simple codes for solving crooked problems! The mood of the 10th episode of our ISFR series reflects this ambivalence quite well. As usual I try to focus on scripts, snippets, and methods, that open up powerful tracks to informed developers…

Continue reading...

Coordinate Spaces & Transformations in InDesign — Chap.4 (Draft)

Chapter 4 of our “Spaces & Transform” eBook is probably both the trickiest and the most important. It tries to reveal the intricacies behind the Scripting DOM resolve() method, the unique tool for setting and processing InDesign locations with respect to the underlying coordinate systems. I spent months figuring out its obscure syntax and improving my knowledge on that particular topic. Understanding the location resolver is a crucial step for developing scripts that can deal in depth with geometry and transformations in InDesign.

Download chapter 4 (PDF, 12 pages -- DRAFT)

Continue reading...

InDesign Scripting Forum Roundup #9

Here is the new season of the InDesign Scripting Forum Roundup series! In this new episode we shall probe various counter-intuitive concepts and behaviors of the Scripting DOM …and attempt to deliver appropriate solutions!

Continue reading...

Coordinate Spaces & Transformations in InDesign — Chap.1-3

Dealing with coordinate spaces and transformation matrices is one of the most obscure and underappreciated exercises in InDesign scripting and programming. The fault mainly lies with Adobe documentation, especially the Scripting DOM reference, which does not clearly explain the topic and some of its essential keys. The following document (PDF, Chapters 1-3) attempts to shed some light on the beast…

Download chapters 1, 2, and 3 (PDF, 22 pages)


• Next chapter now available: “Coordinate Spaces & Transformations in InDesign — Chapter 4”

InDesign Scripting Forum Roundup #8

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…

Continue reading...

Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 2

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…

Continue reading...

Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 1

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?

Continue reading...

InDesign Scripting Forum Roundup #7

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.

Continue reading...

InDesign Scripting Forum Roundup #6

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…

Continue reading...

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…

Continue reading...

InDesign Scripting Forum Roundup #5

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…

Continue reading...

Page Range Formatter

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...

So What's New in InDesign CC Scripting DOM

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!

Download “What's New in InDesign CC Scripting” (PDF)

• 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

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…

Continue reading...

Meet Loïc Aigon, Automation Expert!

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

Loïc's Home Page / Design: Doopix.fr

Continue reading...

Making String.split() support U+0000 in ExtendScript CS4

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.

Continue reading...

140+ InDesign and Creative Tasks            You Didn't Know You Could Automate

140+ InDesign and Creative Tasks -- Top 2012 ReTweetsNew 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…

Continue reading...

Space Invaders Game in InDesign!

Layout Invaders for InDesign CS5/CS6, script created by Philipp Geuder.

Continue reading...

- Page 1 of 3