Questions tagged [javascript]

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

26 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
68 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
596 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
298 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
974 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
168 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
17 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
103 views

How to automatically generate text that adopts the same name as an 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
140 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
248 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
1answer
40 views

How to change the color of text inside a TextFrame instead of color of the bounding box itself

Inside indesign javascript scripting: how it is possible to change the color of a block of text instead the color of the bounding box of the block itself? Because something like: textFrame.fillColor ...
0
votes
0answers
30 views

SVG borders get blurry on drag

While dragging an SVG rect the top border changes its width depending on where the rect is dragged and positioned on the screen. For example, sometimes it looks wide and blurry: And sometimes it ...
0
votes
1answer
52 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
64 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
38 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
126 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
71 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
50 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
50 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
256 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
130 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
669 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
498 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
170 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
810 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
621 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 ...