Questions tagged [extendscript]

ExtendScript is one of the scripting languages available for implementing custom functionality for Adobe products like Photoshop, Illustrator, etc. ExtendScript is based on, and has been kept locked specifically to, ECMAScript 3 (released in 1999).

ExtendScript, or JSX (not to be confused with React's JSX markup) is a scripting language based on ECMAScript 3 (1999) used for scripting custom functionality in Adobe products like Photoshop, Illustrator, etc.

It is syntactically equivalent to JavaScript 1.5, with the same standard library, as well as a custom API for interacting with Adobe product applications and documents.

ExtendScript does not support any language features or standard library functions that were introduced after ECMAScript 3.

930 questions
0
votes
1 answer

Where is the event object for external file event handlers?

In the Adobe InDesign CS6 Scripting Guide: JavaScript (link to pdf), in Chapter 8: Events on page 136 it says, eventListeners that use handler functions defined inside the script (rather than in an external file) must use #targetengine…
dln385
  • 11,630
  • 12
  • 48
  • 58
0
votes
1 answer

Adobe InDesign Server data merging

I'm using Adobe InDesign Server CC and I want to do datamerging. It does merging well, the only problem is that Indesgin Server is SO SLOW. Here is my code: var source = File(app.scriptArgs.getValue("sourceIndd")); //.indd file var destination…
0
votes
1 answer

Illustrator JavaScript only works once - won't toggle

I'm writing a script which changes the colours of a stick-man's arms and legs. Once "he" is selected, it effectively just mirrors the colours: //Declare and initialize variables var msgType = ""; var app; var docRef = app.activeDocument; var…
Ben
  • 4,281
  • 8
  • 62
  • 103
0
votes
0 answers

Is it possible to trigger ExtendScript (with params) from a local web page?

I have a script written in ExtendScript that generates artwork in Illustrator (CS3+). I also will have a local web page that will manage a small-scale database (utilizing localStorage or WebSQL). Is there a way to trigger the ExtendScript from a…
user776686
  • 7,933
  • 14
  • 71
  • 124
0
votes
1 answer

Select all objects on a selected layer

Not sure why this isn't working. I seem to have selected the layer that I want but the pathItems on that layer aren't being selected or changed. var docRef = app.activeDocument; var layerRef = docRef.layers; for (i=0; i
popealope
  • 21
  • 1
  • 5
0
votes
1 answer

Change the value of an objects x coordinate in illustrator extendscript

Could anyone tell me what I'm doing wrong. I would like to change the x coordinate of all the items on an active document so that they are whole numbers. I can loop through and find the items and return their current x value. I can then calculate a…
Bob Haslett
  • 961
  • 1
  • 10
  • 31
0
votes
1 answer

Javascript: accessing a given index in an array that is an object property

Say I have the following object: var obj = { "a": Array(), "b": Array() } And I want to add values to those two arrays. Can I use the following notation? for (i=0; i < 100; i++) { obj["a"][i] = (whatever); obj["b"][i] = (whatever); …
PaulJ
  • 1,646
  • 5
  • 33
  • 52
0
votes
1 answer

Extendscript that merges empty cells doesn't work with more than one table on a page

I needed a script that will merge any empty cells in a table in an InDesign document with the cell directly above it. I thought I had it figured out, with this script: var myDoc = app.activeDocument; myPage = myDoc.pages; for (var p=0;…
PaulTong
  • 35
  • 4
0
votes
1 answer

Does anyone know why an object would miss a property?

We have a script that export our Indesign documents to HTML and one of the routine is to export tables. In this script we go throught each Tables->Rows->Cells and evaluate some of the properties (i.e. bottomEdgeStrokeType, topEdgeStrokeType,…
Eric B.
  • 338
  • 3
  • 14
0
votes
1 answer

Issues in Updating Metadata while Generating PDF

I am working on a Extend Script which saves FrameMaker Book as a PDF. The script is able to save to the PDF but when I tried to add the PDF Metadata (Author/CreationDate/Keywords/Subject/Title) etc, the same does not reflect in the generated PDF. On…
Gunjan
  • 1
  • 2
0
votes
0 answers

My first ExtendScript... and it doesn't work

I am developing a script for Adobe Bridge CS6. For the moment, all I want to do is to access the size (width and height) of a thumbnail that the user has selected and show it, either on a popup or on the console. Here is my script: function…
PaulJ
  • 1,646
  • 5
  • 33
  • 52
0
votes
1 answer

Is it possible to load object properties from an external illustrator file using extendscript

I am trying to work out how to define a set of properties in one style template on an illustrator file them import these properties to use in another. For example I have a pink rectangle named as 'outerbox' that is 50mm x 100mm saved on an…
Bob Haslett
  • 961
  • 1
  • 10
  • 31
0
votes
1 answer

Vanishing panel

I've created a jsx script that creates a custom dialog box in illustrator that allows me to load a text file into a string.. It all seems to work OK in Extendscript but the moment I save it and run it standalone from Illustrator the dialog box…
Bob Haslett
  • 961
  • 1
  • 10
  • 31
0
votes
1 answer

Load jquery without script tag

I'm working on a script in Adobe Illustrator using Javascript. For long winded reasons I'm trying to avoid Extendscript, even though its very useful. Is it possible to load the jquery library without using the tag which for obvious reasons I cannot…
Bob Haslett
  • 961
  • 1
  • 10
  • 31
0
votes
1 answer

InDesign: Accessing document dictionary

In my script, I am copying a table of cells that have a lot of text in them. This text has a bunch of custom hyphenation rules that are saved in the document dictionary, NOT in the user dictionary. This is accessed in the UI by opening User…
UncleToft
  • 38
  • 9