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
0 answers
18 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 ...
user avatar
0 votes
0 answers
47 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 ...
user avatar
  • 113
0 votes
0 answers
41 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: ...
user avatar
1 vote
1 answer
52 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 ...
user avatar
  • 11
-1 votes
1 answer
103 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
0 votes
0 answers
33 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 ...
user avatar
0 votes
1 answer
52 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) ...
user avatar
  • 1,673
0 votes
0 answers
49 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 ...
user avatar
0 votes
0 answers
12 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: //-----------------------------...
user avatar
  • 43
0 votes
0 answers
72 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....
user avatar
  • 43
3 votes
1 answer
246 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 ...
user avatar
0 votes
1 answer
88 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 (...
user avatar
-1 votes
1 answer
71 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 ...
user avatar
1 vote
0 answers
82 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 ...
user avatar
  • 11
0 votes
0 answers
64 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 ...
user avatar
  • 101
1 vote
0 answers
45 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 ...
user avatar
  • 111
0 votes
1 answer
222 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 &...
user avatar
  • 1
1 vote
2 answers
534 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 ...
user avatar
3 votes
1 answer
476 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.
user avatar
  • 31
0 votes
0 answers
51 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 ("...
user avatar
  • 11
0 votes
1 answer
123 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 ...
user avatar
0 votes
0 answers
43 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 ...
user avatar
1 vote
1 answer
264 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 ...
user avatar
0 votes
1 answer
94 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 ...
user avatar
  • 1
0 votes
1 answer
81 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 ...
user avatar
0 votes
1 answer
119 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 ...
user avatar
-2 votes
1 answer
449 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?
user avatar
0 votes
1 answer
167 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 ...
user avatar
0 votes
1 answer
998 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 ...
user avatar
0 votes
0 answers
48 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 ...
user avatar
  • 3
0 votes
1 answer
570 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 ...
user avatar
0 votes
1 answer
120 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") ...
user avatar
  • 35
0 votes
1 answer
303 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 ...
user avatar
0 votes
1 answer
350 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 ...
user avatar
0 votes
1 answer
90 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(...
user avatar
1 vote
0 answers
52 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 ...
user avatar
  • 11
0 votes
0 answers
291 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?
user avatar
  • 101
0 votes
2 answers
2k 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 ...
user avatar
  • 1
2 votes
0 answers
134 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() { ...
user avatar
0 votes
0 answers
114 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 ...
user avatar
  • 1
1 vote
1 answer
371 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 ...
user avatar
  • 11
1 vote
1 answer
96 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: " + ...
user avatar
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 ...
user avatar
-1 votes
1 answer
170 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 = []; ...
user avatar
1 vote
1 answer
81 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=...
user avatar
0 votes
1 answer
94 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 (...
user avatar
0 votes
2 answers
51 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 } ...
user avatar
1 vote
1 answer
849 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 ...
user avatar
0 votes
1 answer
523 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) { ...
user avatar