IdExtenso provides a new ArrayAs2D
module that unleashes the hidden strengths of ExtendScript operators. With this toy, you can now write code that adds, multiplies, evaluates 2D points or vectors. For example, if you develop an InDesign script based on Bézier curves or working on polygonal paths, all calculations of points, distances, normalized vectors, etc. become wonderfully compact…
Tag : JavaScript
Let's Play with JS Array Objects (in ExtendScript)
September 14, 2024 | Tips | en | fr
Make `&` (almost) Behave as a Reference Operator
August 09, 2024 | Tips | en
Suppose you have an ExtendScript class (I mean, “prototype”) whose methods essentially return new object instances. As an obvious example, consider the concat
or slice
methods of Array.prototype
. They always produce a new array rather than reworking the existing one. There are situations where you want to update the calling object —and make this explicit in the code— while still leveraging the methods already available…
Built-In String Features in IdExtenso
March 29, 2024 | Tips | en
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…
Meet Kasyan Servetsky, InDesign Wizard!
August 01, 2023 | Extras | en | fr
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…
15 InDesign Scripts and Snippets You May Have Missed
February 21, 2023 | Snippets | en | fr
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…
Getting Started with IDJS (InDesign UXP Scripting Format)
January 11, 2023 | Extras | en | fr
The funniest thing I've read about the ExtendScript-to-UXP migration is in the (AI-generated?) documentation from Adobe: “ExtendScript uses an antiquated version of JavaScript (ES3), from the era when JavaScript was coded on punched cards.” LOL! Adobe is trying to make us feel like our JSX scripts are ancient artifacts, but let's see if IDJS will actually bring about a technological revolution in InDesign…
Page Range Formatter [UPDATE]
August 17, 2021 | Tips | en
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…
Understanding the `count( )` Method
November 13, 2020 | Tips | en
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?
InDesign Scripting Forum Roundup #13
June 06, 2019 | Snippets | en
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!
InDesign Scripting Forum Roundup #12
June 11, 2018 | Snippets | en
Hey scripters, are you familiar with InDesign events, event listeners, menu actions, idle tasks? That's the hot focus of the 12th ISFR. Plus a fine selection of threads and snippets involving GREP, text, CMYK swatches, IDML, transformations… Enjoy the ride!
InDesign Scripting Forum Roundup #11
September 16, 2017 | Snippets | en
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 eight months. Each topic (and code snippet!) will teach you something you probably didn't even suspect…
IdExtenso: ExtendScript Framework for InDesign Ninjas
April 20, 2017 | Extras | en
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…
InDesign Scripting Forum Roundup #10
December 14, 2016 | Snippets | en
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…
Coordinate Spaces & Transformations in InDesign — Chap.4 (Draft)
June 14, 2016 | Tips | en
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.
InDesign Scripting Forum Roundup #9
January 27, 2016 | Snippets | en
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!
Coordinate Spaces & Transformations in InDesign — Chap.1-3
October 18, 2015 | Tips | en
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…
InDesign Scripting Forum Roundup #8
August 10, 2015 | Snippets | en
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…
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…
« previous entries - Page 1 of 3