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
0
votes
0answers
20 views

Extendscript: How can i change text frame attributes in illustrator

Hi, I am new to illustrator and do not know about its tools' name. So, I want to change these attributes(underlined in red color shown in the picture) through ExtendScripting. Just let me know their ...
0
votes
0answers
20 views

Exporting InDesign file to XHTML file with script

I have a inDesign file with many pages that I want to export to XHTML format. I use a script i found to do so: Main(); function Main() { // Check to see whether any InDesign documents are open. ...
0
votes
1answer
34 views

Indesign: Javascript to access the New Hyperlink panel

I want to create what is hopefully a simple javascript action that I can assign to a keyboard shortcut to save me clicking the same steps over and over. Basically, I want to highlight my text, then ...
0
votes
0answers
19 views

Create multiple document from each group in illustrator useing javascript

I have Ai file whitch file have many groups each group different design. How can I create javascript to separate each group to file. Or any options to do this and each file have to be same name as ...
0
votes
1answer
52 views

How to place xml nodes into indesign pages (one by one)?

I am trying to place a lot of tables into my document, one by one, but i can't place more than 1 table, does anybody knows how to place each table on one page or textframe? I am using xml nodes like ...
-2
votes
1answer
53 views

how get paragraph style and character style of selected text in indesign by script

I want the selected text to be displayed to me when I select a word or text in InDesign by executing the style paragraph script and its style character?
0
votes
1answer
50 views

Get the average color of a raster image for a mosaic effect

I've been searching for a way to get the average color of a raster image, to use in a vector grid in front of it to create a mosaic effect - the "Object > Create Object Mosaic..." menu ...
0
votes
1answer
111 views

Move item to a different layer using script in Adobe Illustrator

This may be a something I skipped over in my search, but can anyone show me how to add an item to a layer using a JavaScript Adobe Illustrator script? Also, are there any good resources for learning ...
0
votes
0answers
26 views

Making svgs in Illustrator that can be morphed from one to the next using javascript

I want to make an animation like this one using svgs and javascript: https://codepen.io/noeldelgado/pen/JdbmYW The problem is that in order to make this transformation possible all the svgs between ...
0
votes
1answer
71 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
32 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
64 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
115 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
1answer
173 views

Issue on returning a variable from an evalScript function

I am working on a CEP HTML panel for Photoshop and I want to check first if there is any opened documents before my panel do what it has to do. So I made something like this into my index.js so to ...
0
votes
1answer
45 views

Communication issue between functions into JS and JSX files

I have made this function into a JS file... function getColors(isPick, isForecolor) { var chosenFunction = 'getColor(' + isPick + ', ' + isForecolor + ')'; csInterface.evalScript(...
1
vote
0answers
22 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 ...
0
votes
0answers
190 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
2answers
732 views

How can I export a PDF from InDesign with Javascript?

I want to find a script (preferably Javascript) and all it needs to do is export a PDF to a specific folder that I can set the path for in the script. Does anyone know of a script that might have ...
2
votes
0answers
72 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
87 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
146 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
1answer
85 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
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 ...
-1
votes
1answer
128 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
54 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
80 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
33 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
351 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
241 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
203 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
109 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
155 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
274 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
333 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
2answers
533 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
399 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 ...
2
votes
1answer
910 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
147 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
79 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
367 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
53 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
1k 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
354 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
136 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
317 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
171 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
180 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
850 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
356 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
106 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 ...