Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

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

0
votes
1answer
27 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
0answers
26 views

Illustrator script to find ANYTHING with gradient and replace to specific color

Trying to work a script that: Select ALL/EVERYTHING with gradient on fill or stroke (texts, shapes, linestrokes, paths - objects, etc) Replace ALL those gradient fills OR gradient strokes with: Fill ...
0
votes
1answer
48 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
49 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
39 views

How to automate the composition of an online book

I am putting together a website that personalised children storybooks with a wide range of options. We have hired an illustrator to illustrate our stories. As we build the website and being new to ...
1
vote
1answer
32 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
79 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
88 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 ...
1
vote
1answer
73 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
0answers
36 views

User specific term replacement in Adobe InDesign (Script)

I was wondering if there was a way, with a script for InDesign, for a user to run the script and enter their own word or words into a dialog box and it then input them into multiple text frames. I ...
0
votes
0answers
41 views

MAC InDesign CS6 will not correctly run a Windows InDesign CS3 JavaScript

I am at loss to what may be going on here. This problem has been happening for a while and I am guessing it has something to do with the JavaScript versions. Currently I have a JavaScript that reads ...
0
votes
2answers
110 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.
0
votes
0answers
110 views

Text frame location with javascript based on value

I have been doing some research and cant really find a solution to this specific process I am trying to automate. Looking to edit my current script so that it calls a chapter number variable within a ...
1
vote
1answer
154 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
0answers
109 views

How to change this TOC hyperlinking script so that the entire paragraph, not just the page number, functions as a hyperlink?

I'm attempting to adapt a script (below) for creating a List of Tables in which each entry functions as a hyperlink within the pdf that, when clicked, takes you to the respective table's page. The ...
0
votes
0answers
37 views

How can I extract sprites with sizes that have no relation together

Basically I want to extract sprites I've started by doing a red rectangle in Photoshop with opacity so I can modify and choose the position data from here https://steamcdn-a.akamaihd.net/...
0
votes
1answer
71 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
101 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 ...
1
vote
0answers
82 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
0answers
19 views

Detecting 3D objects by object name in Photoshop CC with .js

I am attempting to create a function that detects active 3D objects contained within a Photoshop layer by their name. Even with the a script listener, there is no output when I make a 3D object ...
0
votes
1answer
103 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
212 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
1k 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
47 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 ...
0
votes
2answers
242 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
37 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 ...
1
vote
0answers
507 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 ...
0
votes
0answers
51 views

Script to create a pre-comp inside my main comp in After Effects

I am a new to After Effects scripting. I am looking for a way to make a pre-comp inside my main comp and have the pre-comp contain a shape. I'm looking to do it automatically by script.
2
votes
1answer
127 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
790 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
152 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 '...
1
vote
0answers
62 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
161 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
546 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 ...
0
votes
0answers
162 views

Acrobat script to delete a page if a form field is empty

I need a Javascript keystroke script for an Acrobat Pro DC Form field that will delete the page the text field is on if the text field is blank. This is on a continuation page for the field preceding. ...
2
votes
1answer
192 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
197 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
1k 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
358 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 ...
0
votes
0answers
165 views

InDesign CC javascript and hyperlinks: how do you determine what kind of hyperlink you're dealing with?

I am fairly new to scripting, and I'm developing a script that extracts destination URLs from all the hyperlinks in a document. Sure enough, there are some cross-references in these documents that are ...
1
vote
1answer
486 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
314 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
636 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 ...
0
votes
0answers
40 views

Why does this fill pattern go outside object?

I was playing around with illustrator and doing random stuff to make my logo and i managed to make something acceptable. I tried to make it animate and the animation works like this: Select the blue-...
1
vote
4answers
517 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
1k 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, ...
3
votes
1answer
240 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
44 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
731 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
184 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....