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

How to search between a range of characters using indexOf? (ExtendScript)

I'd like to use .indexOf to search between a range of characters in text submitted by a user, but I'm not sure how I would go about it. Let's say: myText = "abcd" and I wanted to search to see if the "ab" existed ONLY at the start, and ONLY up to…
Andy Troz
  • 23
  • 5
0
votes
1 answer

Adode InDesign ExtendScript: Making an element a child element of another

I'm looking for a way in Adobe InDesign CS5+ to make one element a child element of another (similar to what you can do with Edit -> Paste Into). I can't use the app.pasteInto option unfortunately because in my script, the window is not visible. Is…
Pieter Claerhout
  • 348
  • 4
  • 11
0
votes
2 answers

Javascript (ExtendScript) Reg Exp match

I'm working in the Adobe ExtendScript environment (Javascript) trying to match a section from a string, but nothing I try seems to work. Here's an example of the string: Q1: Question 1: this is the first question? - Answer bit - Answer bit - Answer…
kinkersnick
  • 1,301
  • 1
  • 13
  • 19
0
votes
3 answers

Selecting textFrames inside of a group in InDesign CS6

Similar to my earlier problems with finding a textFrame on a page based on its geometricBounds or by part of its name, I now am running into the problem of finding textFrames if they are inside groups. If I use an array of all textFrames, such…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

How can I use SublimeLinter jshint on different SyntaxDefinition?

I'm trying to write a Sublime Syntax Definition for ExtendScript but don't want to loose the possibility to use the SublimeLinter plugin. So how can I tell SublimeLinter that he should use jshint not only on scope source.js but also on my scope…
fabianmoronzirfas
  • 4,091
  • 4
  • 24
  • 41
0
votes
1 answer

Consecutively number images in Photoshop for print

I am creating labels in Photoshop CS6. Each label needs to be consecutively numbered. I have a layer that holds the number in which needs to be changed on each label. I would like to print each label multiple times per sheet. IE. sheet #1 should…
0
votes
2 answers

Custom ScriptUI buttons that will close the window

For those knowledgeable in ExtendScript & InDesign, I have a ScriptUI question: How can I have a window close properly after the user picks one button or the other when the buttons are custom choices. See the code below: $.writeln("The user…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

Converting from full path to tilde path for pushing JSX from Cocoa?

I have a need to convert from a full path starting with /Users/username/file.ext to a tilde path ~/file.ext. I see lots of ways built into NSString and NSURL that go from tilde to full but not the other way around. While I could go the route of…
Philip Regan
  • 5,005
  • 2
  • 25
  • 39
0
votes
1 answer

Cannot set the printBlack printPreference in InDesign

I've learned an enormous amount of scripting for InDesign CS6 thanks to all of the helpful folks here! Now, it's a problem with setting the printPreferences for a document. Here is the code I have: with(document.printPreferences) { …
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

Finding a textFrame in InDesign based upon its geometricBounds

My next problem is to identify a specific textFrame in InDesign CS6 by referencing its positon on the page. I know I can use textFrame.geometricBounds to get its position, but I'm having trouble getting the if statement to work, even though it…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

InDesign scripting: How to print specific spot color in separations?

This is my most difficult question to date! I am still a beginner to ExtendScript & JavaScript, but I am learning fast. Right now, I need to figure out how to tell InDesign to print specific pages of the active document using a printer preset…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

InDesign: ExtendScript to list fonts and extended font information

I need to list detailed information about the fonts used in a set of inDesign documents. The information I need is essentially accessible through the menu item Type › Find Fonts… (as explained here) but going through each font in every document and…
wna
  • 25
  • 2
  • 9
0
votes
1 answer

Getting the current user name or computer name in Extendscript

I'm finally getting some headway made in my script for InDesign CS6. Now, in order for it to know to which printer it should print a document, I need to query which computer the script is running on. Barring that, perhaps the name of the currently…
Sturm
  • 689
  • 2
  • 23
  • 52
0
votes
1 answer

ExtendScript - Can you listen for/change keypress behavior?

I can imagine a lot of different angles to this, but here is my goal: When I use the [blob brush] tool in [Illustrator] I want the option key to toggle the eyedropper tool. I figure the specific tool and application are irrelevant, and the root of…
supertrue
  • 2,049
  • 5
  • 30
  • 49
0
votes
1 answer

Ordering of bidimensional array

Hello I have the following question: I have a bidimensional array which look like this: [[2, C, 22, 22, 8] [2, C, 22, 22, 7] [2, C, 22, 22, 10] [1, R, 45, 45, 4] [1, R, 45, 45, 3] [1, R, 45, 45, 2] [1, R, 45, 45, 1] [1, R, 150, 100, 6] [1, R, 150,…
user2386653