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

Indesign slug text variable script

I'm trying to come up with a script that can be loaded into the InDesign script panel, but that will also run when you open a given document. My documents are named like "REF_ClientRef", which typically looks like 4294_GEN1. I've got two text…
-1
votes
1 answer

Adobe Illustrator variables and scripting - Is it possible?

I've new to Illustrator so I'm not even sure if this is possible. I know there are variables and such, but can the following be done? I have an AI doc that has a map of a state with all of it's corresponding counties. I want to be able to use a…
ssjklaki
  • 25
  • 4
-1
votes
1 answer

How to compile all descendants in a nested hierarchy

I'm having a hard time conceptualizing how best to compile a list of decendents of an array of parents. I have a hierarchy that looks something like this, but the tree could get more complex: [ {parent: 'e', children: ['f']}, {parent: 'b',…
yogert909
  • 9
  • 1
-1
votes
1 answer

Is it possible to call variables inside of an array in javascript?

I have two variables in After Effects which get the X and Y position values of a layer named "Desk"… var posH = app.project.activeItem.layer("Desk ").transform.position[0]; var posV = app.project.activeItem.layer("Desk ").transform.position[1]; I…
-1
votes
2 answers

What is the result of true && true && true && false && true && true && true in javascript?

Should the following: true && true && true && false && true && true && true (with 6 "trues" and 1 "false" in the middle, all connected by &&) result in true or false? The program I'm using, Adobe InDesign (which uses a JavaScript-based scripting…
-1
votes
1 answer

Indesign scripting to get all textframes of a page in order

I am trying to get all the text frames for a single page in order but I was always getting them in random order when using the myDoc.pages[1] //assuming the 1st index page >> [object Page] myDoc.pages[eachPage].textFrames //get all the text…
Sundeep Pidugu
  • 2,377
  • 2
  • 21
  • 43
-1
votes
1 answer

how to check if internet connection is available in MacOS Terminal?

I used Ping command: ping -c1 -W1 8.8.8.8 Works good if online, But in case of internet is't available or LAN is off the terminal takes long time to reply with result.. I want terminal reply in maximum time 1 or 0.5 second to use result in my…
-1
votes
1 answer

Indesign javascript ERROR: MODAL DIALOG OR ALERT IS ACTIVE adobe extendscript toolkit

I try to run my javascript code by indesign but there is the error: MODAL DIALOG OR ALERT IS ACTIVE. Who knows how to solve this problem? #target "InDesign" w = new Window ('dialog'); magicButton = w.add ("button", undefined, "Buttton"); …
-1
votes
1 answer

unable to save new jsx file using extendscript toolkit

I am using MAC OS, In Adobe InDesignCC2019 (Window/Utilities/Scripts/), creating new jsx script in ExtendScript and trying to save a the .jsx file but I am getting the error can't write the file I/O error. I have attached the error screen shot for…
Madasu K
  • 1,813
  • 2
  • 38
  • 72
-1
votes
1 answer

Extendscript: Photoshop scripting IF activedocument Proper syntax

Im having issues trying to do the following. It keeps stopping at the return attribute. Thanks! I want this to check for various filenames and then change the output for those values.. thx. if (activeDocument.search("160x600")>0) { if…
Likenota
  • 87
  • 8
-1
votes
1 answer

edit: script for editing metadata in Adobe Bridge - how should I put "Key Words" (separate words) into code?

I have a simple script for editing metadata in Adobe Bridge with find and replace functionality. It is for Description section only. I need to make it work for Keywords section only instead. I tried to change description into keywords (with and…
-1
votes
1 answer

reading float values from binary file (in after effects script)

I have a binary file containing data recorded using a c program. the data stored in files are float values. Now I need to retrieve the float numbers from binary file in after effects script. This is my code: var myFile = File.openDialog('select…
-1
votes
1 answer

Import data from google spreadsheet to use with ExtendScript Toolkit

I'm using adobe's ExtendScript Toolkit to automate some photoshop image creations. I'd like to read a google spreadsheet published (publicly) as a csv, and use data it contains to edit a psd file (where some text layer named "num" is replaced by the…
Lucien S.
  • 5,123
  • 10
  • 52
  • 88
-1
votes
7 answers

How to test if a string is a not number

I'm trying to verify if a string is text or number. Could not find a proper way to verify. Could you please advice? Here is my problem: var myNumber = "006"; var myText = "1. This is not a number"; isNaN(myNumber); // false isNaN(myText); //…
addme
  • 31
  • 4
-1
votes
1 answer

I want Javascript to run 3 seperate actions based on the filenames of open files in Photoshop

So I am currently trying to create a script in Javascript for Photoshop that will first prompt the user to point to a folder. From there it will open up all the files in that folder and then based on the names of the files it will run separate…
1 2 3
61
62