Indiscripts

Automating InDesign since 2009

Tag : ExtendScript

Operator Overloading with ExtendScript

Operator overloading in JavaScript is a controversial issue. Actually, this dangerous feature has been rejected in ECMAScript 4. However, ExtendScript allows you to override the behavior of many mathematical and logical operators on a class-by-class basis since CS2.

Continue reading...

Binary JavaScript Embedment (CS4/CS5)

The jsxbin format (“Binary JavaScript”) is a boon for developers because it enables them to distribute a script without exposing its precious code. The ExtendScript ToolKit (ESTK) offers an Export to Binary feature which instantly converts a human-readable js(x) file into jsxbin. InDesign can then interpret this file as if it were a pure JavaScript. The only (boring!) problem is that the encoded script is not allowed to load a persistent session through the #targetengine directive. Here is a secret trick to bypass this limitation with a single encrypted file.

Continue reading...

Can InDesign Script Rewrite Itself?

As illustrated by the YALT technique, it's easy —and powerful!— to let a script read its own bytes while it is running. We could even go further and get a script to update itself to achieve some advanced functionalities.

Continue reading...

Page 4 of 4 -