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
0 answers
11 views

Photoshop script to insert an image into a layer

I am using Photoshop and Photopea to streamline a workflow. Rather than making hundreds of PSD templates I am hoping to use a base template in where a script dynamically adds the right image depending ...
0 votes
0 answers
21 views

How to Convert Figma Design to React?

Is there any way with the help of which i can easily convert my figma designs into reactjs? I am new in developing line and it seems very difficult for me to understand react while i have the ...
0 votes
0 answers
24 views

Is there a way to script this button in Datylon?

The button is to relink the data in the file. I have been in contact with Datylon, but I think they are trying to upsale me to use their server integration, but for security reasons, this is not ...
0 votes
0 answers
93 views

Replace Smart Object Script doesn't place the image in the right size, what to do?

// Replace SmartObject’s Content and Save as JPG // 2017, use it at your own risk // Via @Circle B: https://graphicdesign.stackexchange.com/questions/92796/replacing-a-smart-object-in-bulk-with-...
  • 3
0 votes
1 answer
117 views

Script in InDesign to separate document into individual files with naming capabilities [closed]

I'm looking for a script that can separate a document into individual InDesign files that, upon extraction, allows for some naming capabilities for each page such as either: adding a suffix (page ...
0 votes
0 answers
21 views

Drag object around a circle on mouse over - Adobe Animate/Create.js/Easel.js

Using Adobe Animate HTML5 Canvas which employs Create.js/Easel.js. I have the following code which drags an object around a circle. Works Ok, but the object should only be moveable when the cursor is ...
0 votes
0 answers
95 views

How to modify and fix this Adobe CEP Extension (Adobe Scripts Panel)

There is a very useful Adobe CC extension called Adobe Scripts Panel, which is essentially a panel that lets you run scripts on the fly without having to go to File > Scripts > Select Script in ...
  • 123
0 votes
0 answers
57 views

Adobe Animate - HTML5 Canvas - Logic Problem?

I have MC symbols which can be set to the stage though ComboBoxes and dragged into a position. I need to check if any have been dragged into the position in order to run some functions, one being: ...
1 vote
1 answer
56 views

3d virtual exhibition stand

I would like to make an online 3d virtual exhibition stand (visitors of the website should be able to "go" through the 3D stand-model and by chance click on the items or watch the videos on ...
  • 11
-1 votes
1 answer
204 views

How can I SELECT multiple artboards To duplicate them in Adobe Illustrator with action or with script?

I have like 270 files each file have 4 artboards, So I want to duplicate the ArtB(3) and ArtB(4) For 80 times, but I need a script to select the artboards that i need then duplicate them in action to ...
0 votes
0 answers
45 views

Anyone know of a Photoshop Script to change the Hue of multiple layers, randomly and within defined limits?

I have multiple layers, all the same color, and I'd like to use a script to randomly shift the hue a small amount, say anywhere between (-6,+6) to each of the selected layers. I want to produce slight ...
0 votes
0 answers
47 views

Photoshop scripting: save JPEG with different canvas size than document

I'm writing a Photoshop script (in javascript) to save a copy of the document as a JPEG and I would like to save it with a smaller canvas than the photoshop document, without changing the document I'm ...
0 votes
1 answer
56 views

How to decorate strings of text as nodes if they span across multiple lines?

I have a belief network, in which each node is a belief sentence: In my analysis I want to decorate those sentence to make it like they are nodes: (The colors are not matching, but I'll fix later) ...
  • 1,727
0 votes
0 answers
92 views

Illustrator - how to properly check the path is a rectangle shape and is rotated using javascript?

When I import DWG files which contain simple objects, mostly rectangles, circles, lines or polygones and save the result in SVG sometimes i get shapes with matrix transformation. I know what is matrix ...
0 votes
0 answers
23 views

Adobe PDF JavaScript 'app.execMenuItem("ZoomViewOut")' not working as document level script

I put the line app.execMenuItem("ZoomViewOut"); into my PDF document's JavaScript section like this: It turns up in the general JavaScript section like this: //-----------------------------...
  • 153
0 votes
0 answers
94 views

Show/hide standard Adobe Reader toolbar using JavaScript

Is there a line of JavaScript that can be used to show/hide (ideally alternately as a toggle) the default toolbar in Adobe Reader -- i.e. the same that happens when you press F8? I have tried  app....
  • 153
3 votes
1 answer
336 views

How do I fix missing opacity masks in rendered svg files on the HTML5 Canvas [closed]

I'm currently working on a project that is using the HTML5 Canvas API and I'm encountering a few problems, one of which is disappearing opacity masks used to add texture to an element in Adobe ...
0 votes
1 answer
185 views

How can I get a Photoshop script (Javascript) to write a newline in a file instead of Control-M?

I'm using JavaScript script in Photoshop (Ps 22.5.1 on macOS 11.6) to write out some information to a file. When I represent a newline in my code with a \n, instead of getting a newline I get a ^M (...
-1 votes
1 answer
101 views

Copying Selection to Multiple Layer in Different Position

I am trying to cut selection and paste into four different layers using javascript (layer 01, layer 02 etc.) Like the example picture below: I am trying to find a solution but because of my lack of ...
1 vote
0 answers
112 views

Illustrator scripting: setting bleeds

Trying to solve this has been an odyssey, thanks in part to Adobe's new community platform breaking old links. Most of what I found is in this thread. So for some stupid and arbitrary reason, document ...
  • 11
0 votes
0 answers
84 views

Photoshop Javascript - color lookup set lut

Say I have the lookup layer as lookup = app.currentDocument.activeLayer How can I set the setting on the layer? As far as I can tell its Art Layer base class, and I can only see base calls in my data ...
  • 101
1 vote
0 answers
49 views

Script to create linear path from bezier path on document grid

How do I find the nearest grid point of a bezier path as it intersects the document grid? I am writing a script to create a linear copy of of a bezier path. I need to know where the path crosses the ...
  • 111
0 votes
1 answer
282 views

inDesign Script to "when textbox created paste clipboard content in it"

I have no experience with scripting, but I can maybe explain what the intented script should do: Select text, cut it. Ctrl + X after mouseUp. Make textbox (manually). Drag with mouse, if possible &...
  • 1
1 vote
2 answers
700 views

How to write a photoshop script to resize the image until it covers the whole canvas? (not just fit the height[or shortest length])

How to Batch Resize in Photoshop This doesn't seem to work, so I think a script way might be what I need. Adobe Photoshop Scripting The resize method in its JavaScript reference guide doesn't seem to ...
3 votes
1 answer
587 views

How to select or copy all text in InDesign document

I want to select all text content of every page in an InDesign document or copying all text in InDesign document. I have tried scripting method, but did not work.
  • 31
0 votes
0 answers
62 views

AI Script to control the anchor of the rectangle from the left

Can I control a rectangle's anchor on the left with a script up or down (like in the picture). var Rctngl=0; var var_Integer; mm = 2.834645731787465 var_Integer =Rctngl; var_Integer = prompt ("...
  • 31
0 votes
1 answer
161 views

ExtendScript: Align group items centered in Ilustrator

Hi, I am new to illustrator and I want to align the textFrame centered to the pathItem(square) using Extendscript as shown in picture1. I have uploaded another picture, which shows the layer and group ...
0 votes
0 answers
62 views

How to add an image from local machine to already existing layer on photoshop using javascript photoshop scripting?

I have an existing design and layers on photoshop and I want to add an image from my local machine to one of those layers and I don't know how to do it using a script on javascript? please any help on ...
1 vote
1 answer
332 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
1 answer
102 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 ...
  • 1
0 votes
1 answer
93 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 ...
1 vote
1 answer
138 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
1 answer
533 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?
1 vote
1 answer
204 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
1 answer
1k 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
0 answers
51 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 ...
  • 3
0 votes
1 answer
734 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 ...
1 vote
1 answer
140 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") ...
  • 155
0 votes
1 answer
318 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
1 answer
371 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
1 answer
91 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
0 answers
63 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 ...
  • 11
0 votes
0 answers
321 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?
  • 101
0 votes
2 answers
3k 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 ...
  • 1
2 votes
0 answers
139 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
0 answers
124 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
2 votes
1 answer
410 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 ...
  • 21
1 vote
1 answer
97 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
0 answers
53 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
1 answer
185 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 = []; ...