extendscript | This repos wiki
kandi X-RAY | extendscript Summary
kandi X-RAY | extendscript Summary
This repos wiki has moved
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of extendscript
extendscript Key Features
extendscript Examples and Code Snippets
Community Discussions
Trending Discussions on extendscript
QUESTION
I'm trying to create a text box in after effects using extendscript, like the text box when you use the text tool and click and drag a box. Every resource I can find only shows how to make an actual box around text, but I just want the text box so that the text wraps and doesn't go outside the bounds of the composition when using a large font size. Here's what I have so far:
...ANSWER
Answered 2021-Jun-01 at 07:13To create a Paragraph (box) Text layer use the addBoxText()
method rather than addText()
. This takes the parameters [width, height]
which specify the size of the text box.
QUESTION
I need to display a simple html element on a layer on Photoshop using extendscript (JavaScript).
Does someone have any idea how to do this please ?
Here is the html element :
...ANSWER
Answered 2021-Apr-13 at 09:29Didn't find how to draw an html element, but drawed a rectangle on a layer, created a text layer, then merge the both layers together :)
QUESTION
Does anyone know if it's possible to style text a certain way using ExtendScript, only when a certain condition is met for the paragraph in question?
I've cobbled together an ExtendScript script that I use in InDesign to fix text styles when they aren't fixed properly by the Paragraph Style tool, and it works well so far - changing Courier and Arial Unicode text to Times New Roman and fixing the font size - but i would really like to include a function that changes Times New Roman Italic to Times New Roman Bold Italic - but ONLY when the paragraph it appears in has a first letter that is set in Univers. Is there a way I can include an 'if' statement that will only trigger this style change in those circumstances?
Here's my existing code:
...ANSWER
Answered 2021-Mar-29 at 13:58This should get you started. It will be slower than using changeText
, but I don’t think you can do what you’re asking with changeText
.
QUESTION
I'm using cep (csinterface) to communicate with extendscript and I need to pass an array in a fonction. The problem is that extendscript convert my array in a string. I wanted to send a string with delimiter at my function but when I use array.split() I got an evalscript error.
In the index.js
...ANSWER
Answered 2021-Mar-15 at 16:41it depend if you want an array of integer if its the case use JSON.parse:
QUESTION
I am trying to create a script for drawing a frame around my photographs. I already have actions that will do that, but they're not perfect. I always have to tweak them after the frame is created.
The main fundamental problem I see with actions is that there can be no user interface. I want the user to be able to select parameters such as frame size, color, line width, and so on, before the frame is actually drawn. I would also like to give the user the ability to save their selections and recall them the next time the script is used.
The PhotoShop Scripting Guide just has a tiny section at the end about user interfaces. It says "Adobe provides the ScriptUI component, which works with the ExtendScript JavaScript interpreter to provide JavaScript scripts with the ability to create and interact with user interface elements." And it provides this link. But that link only goes to a page that describes, very incompletely, recent changes to that component. Can anyone tell me where I can find documentation that will teach me to use that component?
And in case it matters to anyone, I posted this identical question on Reddit.
...ANSWER
Answered 2020-Oct-19 at 04:12The most comprehensive source is the ScriptingUI for Dummies pdf book by Peter Kahrel.
There's also an amasing WYSIWYG editor by Joonas Pääkkö — it makes the process so much easier.
QUESTION
Further to my question here I'm writing a list of hex colours to a binary file from within Photoshop using Extendscript. So far so good.
Only the binary file written with the code below is 119 bytes. When cut and pasted and saved using Sublime Text 3 it's only 48 bytes, which then causes complications later on.
This is my first time in binary land, so I may be a little lost. I suspect it's an either an encoding issue (which could explain the 2.5 file size), or doing something very wrong trying to recreate the file in a literal, character for character sense. *
...ANSWER
Answered 2020-Aug-05 at 01:07I'm rubbish at JavaScript but I have hacked something together that will show you how to write 3 bytes of hex to a file in binary. I hope it is enough for you to work out how to do the rest!
I saved this file as /Users/mark/StackOverflow/AdobeJavascript.jsx
QUESTION
I am facing issue while running this script(time.jsx):
var timeStr = system.callSystem("cmd.exe /c \"time /t\"");
alert("Current time is " + timeStr);
Documentation of AE
it works in Adobe After Effects but I want to use it specifically in illustrator. Basically, i want to run my Python script from Extendscript(.jsx). But I couldn't find any solution to do so yet.
Your help is appreciated. Thanks in Advance.
...ANSWER
Answered 2020-Jul-17 at 08:05i have found a way to execute Python or other scripts in Extendscripts(*.jsx), and that is it, there is named File object in documentation which has a function named execute(); which executes the scripts according to their statement. For example, you want to execute hello world in python through .jsx file, you need to make a py file including print("hello world")
. After that, add these lines in the script.jsx script:
var pyHello = new File("");
var bool = pyHello.execute();
alert(bool);
If script executed, it would be true, otherwise, false,
QUESTION
everyone. I am a graphic designer, and thought I would start to learn coding to write scripts for Adobe Illustrator in ExtendScript/JavaScript. I started some beginner tutorials and have been making progress. A response to a question I had posted on a JavaScript forum suggested I use Visual Studio Code as a writing environment, so I downloaded it. It seems to be very advanced, and I can't figure out how to use it. I watched some of the introductory videos and they seem to start with an assumption of some experience.
My question is does anyone know of any resources for someone just starting out with Visual Studio Code? I did some searching and couldn't find anything suitable.
Thanks for your time. Joe
...ANSWER
Answered 2020-May-30 at 19:55It is not easy for beginners but you try next steps (if any of steps will look complex, start again):
1) Open Visual studio code
2) Go to menu File -> new File
3) Rename file to somename.js
4) Write code in it
(if you reached this text it means you succeded)
QUESTION
I get this error: test.scpt: script error -41. Couldn't get error text because of error -1700.
AppleScript contents:
...ANSWER
Answered 2020-May-07 at 13:22This has been fixed. The trick is to add a sleep between the execution of two such AppleScripts.
Error code -41 is an OSX error code that can be found in MacErrors.h: mFulErr = -41, /memory full (open) or file won't fit (load)/
QUESTION
I am working on processing meta data information of my Indesign document links, using ExtentdScript.
I want to convert the object to string using JSON.stringify
but when I use it, I am getting error saying:
can't execute script in target engine
.
If I remove linkObjStr = JSON.stringify(linksInfObj);
from below code, then everything works fine.
What is the equivalent to JSON.stringify
in ExtendScript, or is there any other possibilities to display linksInfObj
with its proper contents instead [object object]
?
ANSWER
Answered 2019-May-31 at 11:07ExtendScript does not include a JSON object with the associated methods for parsing, namely JSON.parse()
and JSON.stringify()
. Nor does it provide any other builtin feature for parsing JSON.
Consider utilizing a polyfill to provide JSON functionality such as JSON-js created by Douglas Crockford.
What you'll need to do:
Download the JavaScript file named json2.js from the Github repo and save it in the same location/folder as your
.jsx
file.Note You can just copy and paste the raw version of json2.js from the same Github repo to create the json2.js file manually if you prefer.
Then at the top of your current
.jsx
file you'll need to#include
thejson2.js
file by adding the following line of code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install extendscript
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page