We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [javascript]

Questions related to Javascript code, one of the main technologies behind the web and also being used in Adobe software.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
2answers
1k views

Ending a Photoshop script when no layers are selected

I've been working with a function I found on stackoverflow here that works as far as I can tell by grouping the layers, dumping layer names into an array then ungrouping them. function ...
2
votes
0answers
65 views

How can I get layers data in relation to their group name?

I am making a Photoshop script which gets every layer with Bevel and Emboss effect and then doing some actions. I have make this function so to get layers data... function getLayersData() { ...
2
votes
0answers
334 views

Acrobat - placeholder text for form field?

I have created a form in Acrobat and would like to have placeholder text within each field instead of actual labels for each field. The first approach was a script I inserted into "custom" under the ...
2
votes
0answers
251 views

Artboard renaming issue

I'm working on a script for my team that will allow them to batch rename artboards in Photoshop. We use the following naming convention for our artboards: "ProjectTitle_BannerType_WidthxHeight_LG" ...
2
votes
0answers
815 views

Script to resize InDesign page to fit content

I'm wanting to use ExtendScript javascript to loop through each page of an Adobe InDesign document and change the size of the page to match the visible bounds of all the objects on that page. I'll ...
2
votes
0answers
124 views

Photoshop Javascript - Resize not working correctly

I have written a script in Javascript for photoshop which gets user input (number of boxes on the desktop) then converts it into pixel sizes. The problem is on resizing, the layer doesn't change to ...
1
vote
0answers
13 views

Selecting and moving anchor points based on User input

I am pretty now to scripting inside Adobe Illustrator. I made a basic script, that opens UI window, where user input three dimensions and the output is three variables X, Y, Z. What I want: I want ...
1
vote
1answer
58 views

How to automatically generate text that adopt the same name as imported image or excel file in illustrator?

I have a lot of product photos to edit in Illustrator. I want to create several artboards with one product image, and then one text box for each artboard, but i need these to automatically adopt the ...
1
vote
0answers
101 views

Confusion about stroke and fill for SVG path animations?

I'm trying to replicate this SVG animation: Codepen-original but with my SVG logo. Here is the same codepen with my SVG logo: Codepen-with-my-SVG. I'm new to dealing SVG's and started learning and ...
1
vote
0answers
222 views

Resizing all objects in a layer using Illustrator CS5

IN SUMMARY...MANUALLY all I need to do is ...select all...change width or height depending on which side is longer and constrain THAT'S IT >.<....SOUNDS SIMPLE RIGHT? THE QUESTION IS THIS....Am I ...
0
votes
0answers
29 views

How my CEP extension can listen to “Select” event but only for “historyState”?

As the title says, I would like to know if and how my CEP extension can listen to Select event, but only for historyState and not when I just select a layer for example. Here is an example how my ...
0
votes
1answer
31 views

Why does InDesign search not begin at beginning?

I am using a script to copy sequential lines from an input text file into an InDesign document. I have used the script a number of times with no problems. var fi = new File("C:/Documents/input.txt") ...
0
votes
1answer
17 views

Photoshop Scripting - applying changes only to selected artboards

Having trouble specifically with artboards for Photoshop scripting. What I want it to do: I have a photoshop file with 8 artboards, and I want to apply changes (name changes) to the selected ...
0
votes
0answers
32 views

How can I get layer's data using Action Manager, excluding layers with specific layerSet?

I have make this function so to get data of every layer with Bevel and Emboss effect, within a document. Now I am looking for a way to do the same thing, but excluding a specific group (layerSet). ...
0
votes
0answers
64 views

How to replace Smart Image with a different graphic WITHOUT using Photoshop?

This Q&A offers a method by using Photoshop to load .js. However, I found this website can achieve this goal without using Photoshop. My question is how this website achieves this goal?
0
votes
0answers
34 views

Update Adobe Illustrator CS3 plugin to CS6

I'm seeking a method to make a script currently compatible with Adobe Illustrator CS3; compatible with Ai CS6. On launch Ai CS6, displays "Error loading plugins". The issue could be the UI, as CS3 and ...
0
votes
0answers
44 views

How to find all text layers with specific color and replace this color with an other one?

Recently, I added a similar question about how to find all shapes with specific color and replace this color with an other one. Sergey Kritskiy gave me the solution with a working example which I ...
0
votes
0answers
41 views

How to normalize the colors of a set of arbitrary images into a consistent, instagram-like filtered look

I have a thousand images let's say, of all different types, basically like what you would find on Wikipedia. They are all JPGs though. Some of them have a solid light or dark background with a figure ...
0
votes
2answers
224 views

Dieline image to a box in Three.js

I have created a dieline image using Three.js. Now I need to convert this dieline into a box. This is my code for the dieline: <script> var canvas; var imgElement = document....
0
votes
0answers
43 views

Is there a way to target a path within a clipping group in an Illustrator script

I am super new to Illustrator scripting and am stuck on this problem, and hoping that someone might be able to shed some light for me. I have a clipping mask in illustrator with a curved line being ...
0
votes
0answers
45 views

How to enumerate images on A4 print for multiple pages on Phtoshop?

I have to print some labels on an A4 paper. These labels need to be enumerated with iteration for multiple prints. About 8 labels per page, and more than 10-15 pages, depending on the requirement. I ...
0
votes
1answer
129 views

ScriptUI panel resizing issue

I'm working on a script that receives a bunch of input from the user to change certain text fields around the document. Given the amount of input I want the user able to change in a single run of the ...
0
votes
0answers
63 views

Illustrator Script Group Sublayers One By One

Trying to convert all sublayers of my design (with or without children) into a group on its own. You can check on my screens what i have to what i need to obtain. What i have What i need Here is ...
0
votes
1answer
366 views

Illustrator Script Help create LAYER TO GROUP function

Im kind of new on this and im trying to find a solution to "Group" all layers in INDIVIDUAL/SEPARATE GROUPS. Have not been successful within the 1st stage of my script to work by grouping each layer ...
0
votes
2answers
345 views

ScriptUI Photoshop Palettes

I'm working on a photoshop script that contains a GUI for collecting information. This is my first time using Script UI and I'm running into 2 issues that I'm not sure how to address. Issue 1, the ...
0
votes
1answer
133 views

Test if two Adobe Illustrator PathPoints are the same in script

I am trying to write a function that takes a PathPoint and returns its index relative to it's parent PathItem. Something like this: function getPathPointIndex(pathPoint) { var pathPoints = ...
-1
votes
2answers
597 views

Creating interactive images/videos with links for website?

I am curious on how websites create interactive videos and images with links for websites? Is this accomplished with flash and if so any recommendations on software to use to create basic pages like ...
-2
votes
1answer
442 views

Replacing a smart object in bulk with Photoshop script; Editing script for more than one smart object

I found the following code and it works very well for most Photoshop files I have tried, but the file I want to use it with has 2 Smart Objects, one nested in the other. See attached images. Is it ...