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
3
votes
1 answer

Use npm package in ExtendScript

Update All of my work to get a fully functioning InDesign CC 2018/2019 CEP panel working is in https://github.com/theasci/cep-boostrap. I was able to successfully get npm packages working in both the client and host portions of the CEP panel and in…
spyle
  • 1,960
  • 26
  • 23
3
votes
2 answers

Javascript Photoshop delete paths one by one bug?

Photoshop CC 2017. Using this loop to delete paths one by one results in some paths (out of 8) being deleted only: for(i = 0; i < app.activeDocument.pathItems.length; i++) { alert(i) …
CristianC
  • 303
  • 3
  • 11
3
votes
2 answers

Extendscript Toolkit not stopping at breakpoints, why?

I am scripting Illustrator CS5 with the Extendscript Toolkit. I set several breakpoints in my code, they show up as red dots next to the line number. But when I run the script, it executes all the way to the end without stopping and the breakpoint…
3
votes
0 answers

[ExtendScript]Change font color, size of certain word in text layer

I want replace font color and weight and size of certain word in text layer. For example: I want THIS look different and this as well. My plan was replacing every characters' color between and then "" and "" to be…
3
votes
1 answer

Illustrator and Javascript - Move pathItem to new layer

I can't seem to find this in documentation, as the pathItem layer and parent members are read-only. How do I programmatically change the layer of an object?
ekatz
  • 1,050
  • 1
  • 11
  • 29
3
votes
2 answers

How write text to File by Encode UTF-8?

My code write Text to file in Adobe Script (.jsx): var xml= " 小塚ゴシック Pro" var file = new File(output); file.open("w"); file.write(xml); file.close(); But result encode UTF-8 can't display: ϬӋēĖĢĎ Pro It only can display text "…
D T
  • 3,522
  • 7
  • 45
  • 89
3
votes
3 answers

JSHint: excluding Preprocessor Directives. No, really

I'm working with Adobe Extendscript, which == javascript*, and I'm using the Atom JSHint package in Atom. Extendscript is the scripting framework for Adobe apps like Photoshop and After Effects. Adobe do make an IDE but it's really feeble, so I…
stib
  • 3,346
  • 2
  • 30
  • 38
3
votes
1 answer

Images in a multistateobject

I want to change the position of a picture located within a multistate object. I have joined two rectangles (one of which contains a placed bitmap) to form a multistate object together. But now I can't address these rectangles as rectangles anymore,…
3
votes
2 answers

Photoshop script how to add image to a layer

How can I grab an image by its location on my local machine and insert it into a layer with extendscript? var doc = app.documents.add(); var layer = doc.artLayers.add(); var img = new File('~/Desktop/tanks.png'); layer.image = img; //I want to add…
wazzaday
  • 9,474
  • 6
  • 39
  • 66
3
votes
1 answer

How to simulate a key-press in ExtendScript?

currently I want to write a script for AE, which relieves me of some keyboard inputs. Once the script is running, I want to click with the mouse, and then some key-inputs for example X Y and Z should be simulated. The little GUI and the eventhandler…
OldForester
  • 65
  • 2
  • 6
3
votes
3 answers

JSX script to Photoshop action - Is it possible?

I wonder if there exist a method to convert a simple JSX script to an action. I have created an action and converted it to jsx in order to clean and edit it. Now, I want to convert it back to atn in order to use a keybord shorcut. PS: I did create…
Sergio
  • 608
  • 12
  • 35
3
votes
2 answers

Illustrator - batch insert filename in textpath script crashes Illustrator

First off: I am not a programmer. Just playing around with code and trying to get it to work for a specific task: Here is a script I made for the purpose of inserting a text with the file name in over 600 pdf files. This is suppose to work on all…
elcello
  • 65
  • 8
3
votes
1 answer

jsx illustrator script - set radio option as default when the script loads

First time i ever play around with JSX files. This is an illustrator script i downloaded. I just want to edit it to set an option as default - i want the radio "size" checked by default when the script loads. I tried a couple of things but it didn't…
libertaire
  • 855
  • 3
  • 13
  • 33
3
votes
1 answer

Indesign Script does function twice

I'm assembling a script to automate the production of different versions of a report. The script will first import the XML file, and then run some other functions to tidy up the Indesign project. When I run this script, var myMenuAction =…
3
votes
1 answer

importing CSV file into illustrator with javascript

I would like to open a file dialog box seltect a CSV text file saved from Excel and import this into an array/variable/dataset in adobe illustrator using javascript. Have done some work with javascript but not a power user. Can't work out how to get…
Bob Haslett
  • 961
  • 1
  • 10
  • 31