Questions tagged [javascript]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
49 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() { ...
0
votes
0answers
20 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 ...
1
vote
1answer
51 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
1answer
59 views

Get values from an applied bevel and emboss effect for multiple layers?

I created this function below, to get some values from an applied bevel and emboss effect, like shading angle, shading altitude etc. alert("Angle: " + getBevelAndEmbossValues()[0] + "\nAltitude: " + ...
0
votes
0answers
42 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 ...
-1
votes
1answer
53 views

Explanation of a function line by line for learning purposes!

As the title says, I need someone to give me an explanation of this function below, line by line, for learning purposes. Thank you in advance!!! function getAllShapeLayersData() { var lyrs = []; ...
1
vote
1answer
31 views

How can I get an alert with layers count before they change?

I have this function below and before it calls bevel(); function, I want first to add an alert where it says how many layers going to be change... function goThroughLayers(parentLayer){ for(var i=...
0
votes
1answer
65 views

What is the right way to count all the layers that are going to change into a script?

I am using a script (by Sergey Kritskiy from this question) so to select all shapes with specific color and replace this color with another one. I made some changes, I have also add a confirm window (...
0
votes
2answers
25 views

How can I get all shape layers where their names include specific word?

I have this function which gets all shape layers of a document... function getAllShapeLayersData() { var lyrs = []; try { activeDocument.backgroundLayer; var layers = 0 } ...
1
vote
1answer
31 views

InDesign script to insert pages between existing ones

I try to create a very simple script that adds one page after every existing page of the document and applies one of the masters to it. Unfortunately I have a problem with referencing objects in ...
0
votes
1answer
41 views

How can I get an RGB color using Photoshop's color picker instead of systems's?

I am using this script bellow to get an RGB color from color picker. Any idea how can I do the same thing but using Photoshop's color piker instead of system's one? var hexToRGB = function(hex) { ...
1
vote
1answer
48 views

How to select all shapes with specific color and replace this color with an other one?

I am totally new in Photoshop scripting, but I have some JavaScript experience. I want to make a script (or find an existing one and study it) that finds every shape with a specific fill color in my ...
2
votes
1answer
42 views

Is it possible to animate a PNG image with canvas?

I saw this page and wanted to know if anyone can point us in the direction of how this was created? this moving effect in the header. https://www.jetbrains.com/ i tried something like but i dont ...
1
vote
0answers
84 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
1answer
52 views

Script: Change color Saturation while maintaining L in LAB model

For example, I have a red color #633b3d (Saturation: 40, L: 30) and I want to transform Saturation to 80 while maintaining L (resulting color should be #83211b). If I simply change foregroundColor.hsb....
0
votes
1answer
193 views

InDesign: building charts in EPS or Javascript

Working with alot of business documents and would like to be able to build something like the below chart using post script code. I know something like this can be hardcoded as a plain text EPS file ...
0
votes
0answers
38 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
126 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....
1
vote
1answer
56 views

Scripting - Artboards names in photoshop

I checked in the Photoshop's Documentation if there was any option to work with artboards in scripting. Unfortunately I couldn't find anything. Does anyone have experience in working with artboards ...
0
votes
0answers
30 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 ...
2
votes
0answers
183 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 ...
0
votes
1answer
37 views

Layer doesn't resize properly

I'm having problems figuring out why my layer does not resize to match the dimensions of the source layer. I set signatureLayer equal to the layer named "signature" and pass it and the layer I want ...
0
votes
1answer
70 views

How to run photoshop closed?

Is it possible to run photoshop without running it? I want to run an action that basically replaces image layers and text layers, and quick exports results. Summing up, I have come to know about ...
0
votes
1answer
106 views

How to change in photoshop script color of Smart Object Layer, or Rasterized Image?

I need to change color of Smart Object Layer in JS script. I found how to change TextLayer, but SmartObjects haven't "textItem" property. Need to change it like Color Overlay works in Photoshop. For ...
0
votes
0answers
43 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
192 views

Is there a way to set a specific form field highlight color in Indesign forms?

I have designed a form with text entry fields in Indesign. When viewed as a PDF in Acrobat the field highlight color is a purplish blue (as shown in the image here). Is there any way to set the field ...
0
votes
2answers
112 views

Illustrator Javascript to Embed Linked Images

Hi I'm Trying to Embed linked Images in Adobe Illustrator. I've edited some Javascript code to get the linked Images to Embed and It works fine for 1, 2 an 3 Images. When I try to embed a fourth Image ...
0
votes
1answer
49 views

How to turn off Text Layer-Name Update

In this question: Restore Photoshop Text Layer Name Auto-Updating? The asker talks about Photoshop's 'feature' of automatically updating a text layer's layer-name to the first thing you change the ...
0
votes
1answer
86 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
49 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
80 views

Weird Script UI bug

I'm working on a script with a dialog box in photoshop. The goal is to get an End Date and Time for multiple banners. My Cancel button works fine, but my Ok button produces a weird bug. The window ...
0
votes
1answer
284 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
1answer
149 views

Scripting 1-line vs 2-line text boxes

I will try to ask this question as best I can, but the problem is a challenging one. I have a text box that one part of my script will change the text in. I want to code a boolean variable to check ...
0
votes
2answers
78 views

How to automate the composition of an online book

I am putting together a website that personalises a children storybooks with a wide range of options - text and illustrations. As we build the website and being new to the design/book space, can you ...
1
vote
1answer
60 views

Adobe Illustrator Script Adjustment

I'm working a script to make ALL the texts of a document with some specifics. Glad to say it's already functioning but not completely because it's just working on some of the textframes and not all of ...
0
votes
2answers
258 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 ...
-2
votes
1answer
358 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 ...
2
votes
1answer
270 views

Scripting Artboard Export with specific bit depths

I'm working on setting up a reusable template for some PNG avatars. Unfortunately, the different avatars have specific export requirements. Currently I'm using Save for Web to achieve these specific ...
0
votes
2answers
311 views

How do I set eyedropper settings using Photoshop ExtendScript (Javascript)?

Is there a way to set Photoshop's eyedropper settings (sample size, sample, show sample ring) in a script? Or, failing that, use the script to find out what the current settings are? Thanks.
1
vote
1answer
240 views

Is there automatical way to fill white pixels to black if it's surrounded by black pixel? See my image for more details

Basically, if you look at the image I want to fill the white noise if it's surrounded by black pixels. Maybe not a single white pixel but I definitely would like to fill the bigger patches. I was ...
0
votes
1answer
119 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 = ...
0
votes
2answers
122 views

How to write JavaScript code for checking the colors?

I am working in Photoshop CC and I have only 7 selected colors in our swatches. After the process has been done we will do the indexing. After that is there any possibility to check if there are any ...
2
votes
0answers
210 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" ...
0
votes
1answer
285 views

indesign script - output textframe onto active document

In my indesign document i have around 250 pages, each of which contain 1 table (1 per page). What i am trying to do is: Get the value of the top row of each table Retrieve the first letter of the ...
3
votes
1answer
471 views

Indesign - remove empty cells from table

I have imported XML which contains nested tables and have created a script to remove all empty cells which is as: var myDocument = app.activeDocument; for(var i=myDocument.textFrames.length-1; i>=...
5
votes
1answer
2k views

InDesign: how to remove everything between square brackets

I have a script to find all textframes in a document, and do a regular expression to remove (if contains) all text inside square brackets. For example the text frame might contain: "Lorem ipsum ...
1
vote
1answer
144 views

Indesign Script - output xml content as textframes [closed]

Is there a way of looping through xml tags and output each tag onto a new page of an indesign document Here is what i have so far but i think i am way off: var myDocument = app.activeDocument; var ...
1
vote
2answers
406 views

InDesign Script to create URLs

Is there a script to use within InDesign so it finds a URL within textframes and it turns it into a hyperlink? As I am aware, to create a hyperlink within InDesign requires you to right click and ...
1
vote
1answer
97 views

SVG stroke-dashadjust polyfill. Trying to get SVG dotted stroke to align dots at the ends

W3C SVG Strokes introduces stroke-dashadjust but no browser implements it yet. Adobe Illustrator's stroke panel has a button for this feature – its tooltip reads Aligns dashes to corners and path ...
2
votes
0answers
760 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 ...