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

Getting text layer shadow parameters (ExtendScript CS5, Photoshop scripting)

Is there any way to get text(or any other) layer shadow params in Adobe Photoshop CS5 using ExtendScript for further convertion to CSS3 like text string? Thanks!
Michael Malinovskij
  • 1,422
  • 8
  • 22
3
votes
1 answer

How to close hidden InDesign documents?

While scripting InDesign, I've had plenty of instances where I create a new document that's hidden until I execute all of the actions, and then I use myDocument.windows.add(); to get it to show. However, I've also had plenty of instances where I get…
Brendan
  • 868
  • 1
  • 16
  • 38
3
votes
1 answer

How can I programmatically clear text selection in InDesign with ExtendScript?

I've programmatically selected some text in InDesign using ExtendScript: app.findGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.appliedFont = myFont; var matches = app.activeDocument.findGrep(); if(matches.length > 0) { …
Shawn
  • 10,931
  • 18
  • 81
  • 126
3
votes
1 answer

Can I assign multiple values to the appliedCharacterStyle property of InDesign DOM's Text object?

I am working on an ExtendScript script which we use to prepare InDesign files for export to XHTML. Basically, we just go around applying character styles where we need them (have a look at this simplified…
Shawn
  • 10,931
  • 18
  • 81
  • 126
3
votes
1 answer

Select and merge layers in Photoshop

I want to explicitly select multiple layers (by reference, not by name or anything else involving re-searching something I already have a reference to!) and merge them in Adobe's Javascript (aka. Extendscript). I can set the document's activeLayer,…
George R
  • 3,784
  • 3
  • 34
  • 38
2
votes
2 answers

Indesign JavaScript Creating Text & intra-doc Hyperlinks in Book - Extremely Slow

First time posting First time writing in JavaScript, though I have experience in other languages. I'm working in Adobe InDesign CS5.5. I have multiple files in an ID Book, each containing a varying number of "chapters". The book includes an index…
2
votes
1 answer

JSON stringify an entire object in ExtendScript / Indesign

I am working on a CEP plugin for InDesign. Since the jsx doesn't support much functions (ES3) I want to export objects from InDesign to javascript and then continue working on them there. To be able to do this I have to send JSON from the plugin,…
Taztevenn
  • 21
  • 1
  • 3
2
votes
1 answer

How to use Extendscript in InDesign to get unused text styles?

I use Extendscript to help me review students' work in InDesign. I run a script that goes through a document and creates a report. One of the things I need to list on that report is wether or nor unused paragraph styles exist, preferably also…
2
votes
0 answers

Can I Replace ProjectItem path with Another projectItem in Premiere Pro Extended Script?

ProjectItem.changeMediaPath(path); where path is path for example a video files path. This can be done. But the real question is ProjectItem is like a i have created subClip created from ProjectItem with in and out points, with speed / duration…
2
votes
1 answer

Photoshop scripting circular selection on new layer

I'm trying to dynamically add layers in a Photoshop script via JavaScript. The layers have a circular selection, not rectangular or triangular. For example rectangular: var RectangleSelection = Array( Array(x, y), // start position Array(x +…
2
votes
2 answers

extendscript after effects listbox if statement not working well

i have listbox item_1 and item_2 and more but for the sake of it this is enough. this is my code when listbox item_1 is selected and item string is item_1 then fire the code for that only. listBox.onDoubleClick = function () { //alert…
hans
  • 129
  • 7
2
votes
1 answer

indesign script to add a polygon (irregular shape textframe) and add text to it

I need an Indesign script to add a irregular textframe (polygon) to page and add text content to it. I have so far this code. but it is a regular text frame. var doc = app.documents.add(); var textFrame = doc.textFrames.add(); …
Ali Haghighi
  • 143
  • 3
  • 11
2
votes
1 answer

Is it possible to read MS Document or Excel in indesign script?

I have following code. My script can read external file liken(txt) and place it to InDesign file but if I try to change .txt --> .doc I get some weird characters It looks like .js or .jsx doesn't know to read it What I can do in this case? this…
Michaela
  • 309
  • 3
  • 16
2
votes
1 answer

How to fit all pages of a PDF file in Indesign using python?

Internet searches have yielded the following results: import win32com.client app = win32com.client.Dispatch('InDesign.Application') myFile = r'C:\test.indd' myDocument = app.Open(myFile) myPage = myDocument.Pages.Item(1) for x in range(0, 5): …
Oleg
  • 23
  • 2
2
votes
2 answers

Is it possible to detect the change of page in InDesign using CEP/ExtendScript/JS?

I'm currently creating a plugin on InDesign and I would like to know if it's possible to detect if the user changes page ? I searched in the web and documentation, I found a few events but nothing that interests me. I thought about storing the…