Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
2answers
128 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
252 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
387 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
563 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
192 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
470 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
111 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
820 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
1answer
177 views

Photoshop/Javascript - Will this code help me draw fronts on weather maps?

I am a meteorologist. I use Photoshop to help annotate maps. One thing I always wanted to do, but couldn't, was draw weather fronts. Recently I've come across some javascript used by leafletjs to ...
0
votes
1answer
2k views

Photoshop script to select specific colors

Please note that I'm a complete beginner and this is my first coding question ever. If this is more appropriate on another site, tell me. I want to automate a process were the program select a ...
3
votes
1answer
247 views

Bullet list syntax for Adobe InDesign script

I'm looking for the syntax that defines bullet points so that I can create a bullet list in a script for use as a guide template for other users. At a guess my best bet so far is that it's under '...
2
votes
0answers
124 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 ...
0
votes
1answer
412 views

How to assign and execute a custom JavaScript function to a button on InDesgin?

I am new in scripting. I have checked other answers and a few tutorials but I failed to find a way to assign custom function to a button on InDesign. I built a PDF and added a button. I want to ...
2
votes
2answers
1k views

Search for string and delete entire text frame with JavaScript for Illustrator

I can delete a layer by name: var myDoc = app.activeDocument; var myLayers = myDoc.layers; var myLayer = myLayers["layer name"]; myLayer.remove(); or by stacking order: var ...
2
votes
1answer
345 views

exportSVG in jsfl run as a command in adobe animate doesn't work

In Adobe Animate and with a .fla file (after importing a swf file, import to stage), I run this script var exportFileName = 'file:///C|/temp/files/a.svg'; fl.getDocumentDOM().exportSVG(exportFileName,...
1
vote
1answer
380 views

How to package an illustrator file with extendscript javascript? [closed]

I have a lot of Illustrator files that I have to assemble (package) individually. I would like to know if it’s possible to do this with extendscript? I have found a function 'packageForPrin' in API ...
0
votes
2answers
2k views

Exporting SVG from Illustrator with stroke as an SVG attribute

I have created a simple chevron icon in Illustrator and now exporting it as an SVG. Technically, it's just a path with a 2pt round brush stroke. When I export it as an SVG with the stroke applied I ...
-1
votes
2answers
602 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 ...
1
vote
1answer
741 views

Photoshop javascript, how to select contents of a layer

Is there a method for the following function (mac) Command-click on thumbnail in layer panel? (So all non empty pixels get selected in specified layer.)
2
votes
2answers
678 views

How to script a popup box before closing a document - InDesign

I have used javascript to script before, using an eventlistener to say app.addEventListener( "beforeClose" , [function]); function [functionname]() etc... What I need is a way to tell InDesign '...
0
votes
1answer
1k views

Script to change a color in all layers of a PSD file to another color?

Is it possible to loop through all layers (there are too many layers) and replace one color with another. Need automated approach, script or simple action. Loop through all layers{ Change Fill ...
1
vote
4answers
747 views

How to rotate all items as a group? (In a script, Illustrator)

I have an SVG with a few curved paths. I'd like to create n versions of this, by rotating them around as a group (360 / n degrees apart), around the center of the square-shaped canvas they're in, like ...
0
votes
2answers
2k views

How to insert text into an Illustrator file using ExtendScript JavaScript

I opened my Illustrator file successfully using the below code: var fileRef = new File("E:/project/AH_Portrait.ai"); var docRef = app.open (fileRef) I want to write some text ("Handgloves") into it, ...
2
votes
1answer
373 views

Logarithmic Spacing in Illustrator

I'm trying to space text logarithmically. My goal is essentially the same as the one presented here, which is useful but doesn't help me as the only advice provided is to use JS, which I'm not ...
1
vote
1answer
56 views

PDF Form Calulations

I have a PDF form with calculations that I just created and I intend on using it as an order form. I created it in Excel then brought it into Acrobat Pro DC (Mac OS) to create the form. Its just a ...
1
vote
1answer
1k views

Blood Dripping Down Screen Effect [closed]

I was wondering if anyone had a tutorial or an idea of how to create a dripping effect similar to that of the famous blood drip. In this case, I was curious as to how I could change the color, instead ...
1
vote
1answer
352 views

updating links based on pageItem name, not based on index of 'links.items'

I have a indesign document with several images. I want to update these images with Adobe Indesign Scripting. The following code works. var file = new File ('/MyDisk/image01.png'); app.activeDocument....
1
vote
1answer
723 views

What is a Type 1 font in InDesign?

Diving down the rabbit hole of scripting InDesign to learn more about what fonts are in a file I ran across several font types but I'm unsure what it means in InDesign when you have a Type 1 font type....
0
votes
1answer
615 views

Break SVG file into multiple files

I'm a programmer with almost zero knowledge of graphics and svg structure. But I would like to know if it is possible to break this kind of svg file into multiple ones. Or at least access only one ...
2
votes
1answer
1k views

After Effects expressions to sum numbers and control charts

I would like to build a project in which I will change two numbers and all of the following take place automatically! I'll Explain... Part 1: I have two layers, "Number 1" and "Number 2". Suppose I ...
2
votes
1answer
7k views

Exporting SVG paths to HTML to animate with JavaScript

I have a complex blueprint, which I've traced in Inkscape. I'm going to programmatically animate the path and also add some other effects with JavaScript. I can include the file using HTML (e.g. <...
4
votes
1answer
1k views

Vector Format Perlin Noise Effect

Goal is to Achieve vector formatted Perlin noise line art. Visual Examples of the desired effect: It is possible to create a static Perlin noise effecting using only Adobe Illustrator or photoshop? ...
1
vote
1answer
522 views

Design Research: Interactive graphic following mouse pointer on website

Doing some more visual design technique research. Nikita Nikiforov shows a very interesting visual feature on his website Nikita Nikiforov. See the .gif below or visit the website to see it in action....
1
vote
3answers
786 views

Calling Pathfinder Divide through JavaScript in Illustrator?

How do I call Window → Pathfinder → Divide through JavaScript in Illustrator? If not, can I call an action that pushes this button through javascript?
2
votes
1answer
864 views

Website Designs with Round Headers?

Does anyone have any examples of live websites with round headers? Similar to this: http://www.nasty-creatures.com/ I'm working on something for a client and have come up with a design with a round ...
2
votes
2answers
625 views

How to approach animating a svg from left to right? [Web]

I have image below which is text mixed with dots. As the paths are not in order from left until right, how would one approach animating from left to right? The only way I can think is to label each ...
1
vote
1answer
184 views

HorizontalScale when exporting JPG limits to 776.19

I'm trying to export jpeg files from multiple eps files (with many different artboard sizes) with a specific size - 5000px on long edge. But when artboard is too small horizontalScale exceed its range ...
0
votes
2answers
2k views

How do I position an InDesign object using Javascript?

I'm working on a calendar in InDesign and I have a circle object (oval) that I want to position over the day of the month: I'm pretty sure it should be possible to write a script that sets the x,y ...
0
votes
1answer
506 views

“Fit All in Window” using JavaScript

I've recently started scripting in Illustrator and having a little problem. When creating a document through File tab, (File->New, Print, Letter) the created document is positioned at (0,0) and the ...
0
votes
1answer
1k views

Illustrator Script to create Clipping Mask

How is it possible to create a clipping mask with a illustrator javascript script? I tried this, but it doesnt work. var group = app.activeDocument.groupItems.add(); var rect = layer....
1
vote
1answer
126 views

Programmatic swirl function

In the following post @joojaa writes out the math function for the artwork shown here: His code is specifically in PostScript, which is awesome...but I'm wondering if this can't be converted to ...
1
vote
1answer
83 views

How to draw high-resolution images on client-side?

Any libraries, API, or tips are welcome. I am trying to draw Landsat 8 images using Canvas utility of Javascript on my browser. The grayscale reflectance values for Landsat 8 bands are from minimum -...
2
votes
1answer
1k views

What is the difference between .jsx and .js?

I am new to Adobe Scripting - what is the difference between .jsx and .js?
0
votes
1answer
175 views

JavaScript library that will display variable size wedges on a Pie Chart [closed]

I'm looking for a JavaScript library that will create pie charts with variable sized wedges like in the image. (It looks like a doughnut graph but the the image in the middle just has a white border ...
-2
votes
1answer
312 views

What technology to use to make animation in browser? [duplicate]

I want to make an animation of a blob of ink flowing down and then shaping into text. What js libraries can I use. On my research the only way i could find to do this was SVG with GSAP js library. Is ...
1
vote
1answer
52 views

Is it acceptable as a web developer to know very elementary JavaScript and rely on frameworks such as Materialize?

I've been using cusotmised Materialize CSS for most of the effects I want on my pages. I know very little JavaScript. Is it reasonable for me to continue working with frameworks such as Materialize ...
2
votes
1answer
2k views

InDesign script to list hyperlinks in active document

I am trying to get a list of hyperlinks from my document printed in the console or output to text file. This is what i'm playing with: for (k=0; k<app.activeDocument.hyperlinks.length-1; k++) { ...
3
votes
1answer
880 views

Animated SVG Javascript Infographic for timeline

I am considering to make an animated infographic based on SVG, Javascript and CSS technologies of a timeline. I have lots of experience in programming but not so much in using these technologies to ...
8
votes
1answer
1k views

Script to automatically snap all points to grid in Adobe Illustrator?

How would you write a script to move all points of all selected paths to the nearest (non-pixel grid) grid point? e.g. I want all of the points of each polygon/path to snap to the nearest point on a ...