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
2 answers

how do i use a javascript folder object

I have been using a folder object as part of a script written in javascript and used for photoshop cs6 scripting. My question regards the folder object The cs6 javascript referance document says the following about folder objects "ExtendScript…
megaman
  • 1,035
  • 1
  • 14
  • 21
3
votes
1 answer

How to handle dependency cycle in commonjs

I've been working on a commonjs implementation on ExtendScript Toolkit lately and I am stuck with this "dependency cycle" thing. My code passed most of the commonjs compliance tests except on these: cyclic, determinism, exactExports, monkeys. The…
Anthony
  • 589
  • 3
  • 15
3
votes
1 answer

File.execute() is not executing my script. How to debug this issue?

I'm writing a script for Illustrator CS6 in ExtendScript. At the end of my script, I want to spawn a task (a second script, in Ruby) using File.execute(). However, it's not working. And I'm at a loss as how to debug the problem -- how can I figure…
Evan
  • 2,400
  • 1
  • 18
  • 34
3
votes
2 answers

Illustrator grouped objects inside of a compound path

I'm running into a scripting problem with Illustrator CS6—one that's been plaguing me for quite some time now. Groups inside of Compound Paths. I've got a script set up to extract all of the used colors in an Illustrator file, as well as halftone…
Sturm
  • 689
  • 2
  • 23
  • 52
3
votes
2 answers

InDesign script error: "Expected Layer, but received Layer"

I have a (very large) script running in InDesign that, at one point, places a Library asset onto the page, then moves it to a certain layer. This script runs just fine on all of our computers here, but only when there are no other documents open in…
Sturm
  • 689
  • 2
  • 23
  • 52
3
votes
1 answer

Cannot get access token from OAuth Google API for installed applications

I'm creating an OAuth authentication flow so users of my installed application can access their private Google spreadsheet documents. I'm coding with Adobe ExtendScript, so I cannot use the Javascript client libraries Google provides. I've read…
ariestav
  • 2,799
  • 4
  • 28
  • 56
3
votes
1 answer

Setting Selection to Layer Transparency Channel Using Extendscript in Photoshop

In Photoshop it is possible to Set Selection to the Transparency Channel of a layer by pressing ctrl/cmd and clicking on the thumbnail of the layer in the layer pane. When recording this as an action, it is displayed "Set Selection To: transparency…
Richard Cagle
  • 158
  • 1
  • 11
3
votes
2 answers

How to properly remove hyperlinks from inDesign Document using Extendscript?

Part of our import process is to remove hyperlinks from word documents. The script we have in place is pretty simple, straightforward and work to some extent. The issue we are having is that even tough we are removing the link using the code below,…
Eric B.
  • 338
  • 3
  • 14
3
votes
1 answer

Cannot handle request because a modal dialog or alert is active

I've just about finished an ExtendScript project for Adobe InDesign CS6. One of the last few bugs I need to squash comes in the form of this error message: Cannot handle request because a modal dialog or alert is active What happens in the script…
Sturm
  • 689
  • 2
  • 23
  • 52
3
votes
2 answers

Javascript/ExtendScript/ScriptUI temporary window message

This should be relatively simple. While writing a script for Adobe InDesign CS6, I'd like to have a window/palette appear briefly—say, about two seconds— to notify the user that the end of the script was reached successfully. How can I go about…
Sturm
  • 689
  • 2
  • 23
  • 52
3
votes
3 answers

InDesign copy layer to another document

I am trying to write a script that copies a layer from one document into another. var srcDocName = 0; var destDocName = 1; var layerNameOriginal = "Original"; var layerNameCopyTo = "Destination"; var destDoc = app.documents.item(destDocName); var…
Loopo
  • 2,204
  • 2
  • 28
  • 45
3
votes
1 answer

How to detect shift down when clicking on ScriptUI button?

On my scriptUI panel, I have a button. How can I detect whether the user is holding the shift key when they click on the button?
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
3
votes
1 answer

When is "var" parsed?

Sometimes var affects code before it, and sometimes not. Take this example: base.jsx: $.global.a = 1; $.writeln("a: " + a); var a = 2; Running this prints a: 1. Running $.evalFile("base.jsx"); also prints a: 1. However, running (function() { …
dln385
  • 11,630
  • 12
  • 48
  • 58
3
votes
1 answer

Is After Effects object model available for testing outside of Adobe ExtendScript Toolkit?

I am actually writing a script, which I prefer to test in my browser with Javascript tools such as Live Reload, Mocha.js and Google Chrome's inspector. Although, my browser legitimately returns me errors when I call app obect methods. Would there be…
seblavoie
  • 83
  • 1
  • 8
3
votes
3 answers

ExtendScript's UnitValue

So I can't find, for the life of me, a clear breakdown of the components of ExtendScript's UnitValue object. Every source I found had something to do with Adobe, and didn't explain it. I'd really like to have a full reference on it, but if no one…
Codesmith
  • 5,779
  • 5
  • 38
  • 50