Copy link to clipboard
Copied
I'm wanting to jump into learning scripting but quickly run into errors when looking at the example Scripts. The two I have looked at so far are CreateSwatch.jsx and CreateSpotSwatch.jsx. Neither script actually works, They get hungup. Here are the lines of code that are being flagged:
var swatch = docRef.swatches.add();
and a similar looking line from the other file:
var spot = docRef.spots.add();
Why do the example scripts not work? Is scripting something that isn't really supported? The information online is more sparse than almost anything else I have tried to find information on. There are hardly any YouTube tutorials. The Illustrator Scripting Reference Guides were updated on Adobe's website for every version up to CC 2017, but nothing after that (https://www.adobe.com/devnet/illustrator/scripting.html).
Copy link to clipboard
Copied
You mean both scripts from the example scripts folder in Illustrator?
I tried both and they works very well for me.
Maybe you did some beginner mistakes.
Which is your Illustrator version?
Did you copied the scripts in the scripting folder and run from menu: File --> Scripts?
Or in which way you tried to run the scripts? From ESTK? With the correct target engine?
Questions over question. Please describe the way you tried to work with the scripts - exactly.
Copy link to clipboard
Copied
I was trying to run them through ESTK. I went back after reading your reply, and tried to just run these two specific scripts within Illustrator; they both work fine when selected within Illustrator.
They do not work when I press the Play button in ESTK. I have it connected to Illustrator fine by selecting Adobe Illustrator 2020 in the top left dropdown. I have tested that it is properly connected but writing something very simple and running it:
app.documents.add(DocumentColorSpace.CMYK);
I have the latest version of Illustrator CC 24.0.2
EDIT: I get this error within ESTK:
an Illustrator error occurred: 1346458189 ('PARM')
Find more inspiration, events, and resources on the new Adobe Community
Explore Now