Site logo

Miscellaneous scripting tips & tricks

Here I am going to collect some interesting stuff (sorted by alphabet) I find on scripting forums.

ActiveX Component — “Cannot create ActiveX Component” error message (on Windows only)

Anchored objects

AppleScript

Array

Assignment

Background tasks

BridgeTalk

Bugs (see also non-scripting bugs)

bat-files (executing with/without the arguments)

CEP Extensions

Clipboard

Color & swatch

Command line — passing arguments to the jsx file from command line

Conditional text

How to apply unconditional to conditional text

Uploading conditional names from external csv by

Convert an image file to Base64

CSV or tab delimeted TXT file

Damaged documents (apps, scripts and tips for recovering)

Data Merge — Export to PDF using Data Merge

Dialog (InDesign's built-in class)

Dialog boxes — see Scrip UI

Dictionary

doScript

dll — an example of creating external library

Error messages

evaluateXPathExpression vs XML-rules: which is better?

Events

everyItem().getElements()

Excel

ExtendScript Toolkit (ESTK)

External library — an example of creating dll file

File - Folder

Font

Frame — can contain more than one object at a time

Function — How to find function name from inside of itself

Glue code loading

Glyph

Gradient

Example of making gradient by script in InDesign server

GREP

Hyphen

HTML — see Web

Idle task

#include, #includepath (load library)

Kerning

Label

Locale independent strings

Logging

Macintosh

Measurement Units

Menu item

Metadata

Microsoft Visual C++

Object hierarchy

Override

Overset text

Page numbers

How to make page numbers appear in the column?

PageRange tester — Parse, format and normalize page ranges.

Path

How to check if a shape is inside another curved shape?

 

Performance

Plug-in

inexutils — InDesign plugin to ignore missing plugins information from documents (by Manan-Joshi)

Polygon — How to calculate the total coverage of an irregular polygon shape in InDesign

Python

Random — place circles at random locations

Script UI

Collection of dialog boxes

Icon making

PNG creator function

Selection

Server (InDesign)

Example of making gradient by script in InDesign server

Shape

How to check if a shape is inside another curved shape?

Shell scripts (running from JS)

Socket

Sorting

Special characters

Table

Table of contents

Text frame

TextStyleRange

TextStyleRange bug

Transformations

Transforming page items

Coordinate Spaces & Transformations in InDesign

Unavailable to scripting features in InDesign

URL

Liberal Regex Pattern for All URLs

An Improved Liberal, Accurate Regex Pattern for Matching URLs

JSXGetURL for Creative Cloud and InDesign Server

Unified eXtensibility Platform (UXP)

Varnish — add varnish script

Version of an InDesign file

Versions of InDesign application

Visual Basic (VBS, VBA)

Web

While Loop — While Loop with Array.pop() Gotcha

Xcode — How to debug Indesign plugin source code in Xcode?

XML

XMP