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

Javascript code to open several files in subdirectories

I'm a fairly new programmer. I'm attempting something pretty advanced, but I enjoy a good challenge. :~) I'm using Adobe's ESTK (ExtendScript Toolkit) to write a complex script for InDesign CS6. I've gone through most of the tutorials and have…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

How to replace selected text in InDesign via script?

In my scripted UI panel, I have a button that is supposed to insert some text. I came up with this routine, which, indeed, inserts whatever text wherever I want, but if there is any text already selected, it doesn't replace the selection. How can I…
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
0
votes
2 answers

Pass message from javascript to application - Windows and Mac OSx - Lazarus

I need a javascript function to trigger a function in an application developed in Lazarus for both OSx and windows. I'm learning Lazarus and I'd describe myself as a medium level beginner. I know very little about javascript. As I understand it…
0
votes
1 answer

indesign script to set font based on xml parent's attribute

I am trying to find an Indesign javascript that can set the font and style based on the import XML parent's attribute, 1000w10 max
Pat
  • 163
  • 4
  • 12
0
votes
1 answer

How to use aiBringToFront in Illustrator Extendscript?

In Illustrator, I want to create a function in one of my scripts for Bring to Front. In the CS5 Type Library, I find the object, AiZOrderMethod.aiBringToFront, however, I can't figure out how to use it. Here is what I've come up with so…
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
0
votes
2 answers

Is there a reference for ExtendScript action ID codes?

There is a section called "Appendix A: Event ID Codes" at the end of the ADOBE PHOTOSHOP CS6 JAVASCRIPT SCRIPTING REFERENCE. Is there something similar but not just for events? For example, I'm using the ScriptListener to learn how to do some…
maltalef
  • 1,507
  • 2
  • 16
  • 27
0
votes
3 answers

JSX duplicate layer Adobe Photoshop

I have a problem with duplicating layers from one document to another. I have this code (.jsx script inside my Photoshop document) var docRef = app.activeDocument; app.activeDocument.selection.selectAll(); var calcWidth =…
yety
  • 701
  • 2
  • 16
  • 26
0
votes
2 answers

Moving selection relatively from current position

I'd like to move a selection I made through the whole document by its width amount (var x2) relatively to its current position. It seems there was a translate function in earlier versions that did exactly what I want but this function now gives an…
timonsku
  • 1,249
  • 2
  • 21
  • 45
0
votes
1 answer

How do I programmatically capture and replicate Ai path shape?

I'm using ExtendScript for scripting Adobe Illustrator. I was wondering if there was a sneaky way or a script available to programmatically capture and then replicate a path shape, sort of JavaScript's .toSource() equivalent. Thanks
user776686
  • 7,933
  • 14
  • 71
  • 124
0
votes
1 answer

Accounting for vertical slope

I'm not a programmer primarily, so this might be a simple answer. I'm working on a script in Illustrator where you select three points and then it does stuff. First it makes a triangle. Then, it recreates two of the line segments in the triangle and…
Brendan
  • 868
  • 1
  • 16
  • 38
0
votes
1 answer

How to find Shape of the textframe

I have three textframes with different shapes. One is regular rectangular frame, other is oval and last one is triangular textframe. I want to find the shape of the text frame. Do anyone know how to find the shape of the textframe? Thanks in…
vDeepak
  • 103
  • 1
  • 5
  • 11
0
votes
1 answer

InDesign CS5 Script: How can I automate "Alt + click" on the XML structure pane?

I have this script, which is displaying the  View --> Show Structure  pane: with(obj.doc.xmlViewPreferences) { // this opens the View --> Show Structure pane showStructure = true; showTagMarkers = true; showTaggedFrames = true; …
Ian Campbell
  • 2,678
  • 10
  • 56
  • 104
0
votes
4 answers

How do I quit InDesign and open Illustrator using InDesign scripting?

How do I quit InDesign and open Illustrator using InDesign scripting? This is my code: // closing the InDesign document here myDocument.close(SaveOptions.NO); // change the script's target to Illustrator #target…
Padmashree
  • 7
  • 1
  • 4
0
votes
3 answers

InDesign CS5 Script: How can I ignore the DTD when importing XML?

I am importing XML into InDesign, and I get this message: The external entity 'blahblah.dtd' cannot be found. Continue to import anyway? And when I then continue to import the XML, I get this error message: Javascript Error! Error Number:…
Ian Campbell
  • 2,678
  • 10
  • 56
  • 104
0
votes
1 answer

Using Adobe ExtendScript (Ext JS) to read a variable and rotate a shape

I'm using the variables panel in Illustrator to pull a data set I've got. For example there's 2 text variables and 1 number going from 0-359. I'm looking for a script which looks at the variable name and pulls the number, then uses that number to…
davebowker
  • 4,475
  • 7
  • 27
  • 32