• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I install estoolkit?

Community Beginner ,
Aug 29, 2024 Aug 29, 2024

Copy link to clipboard

Copied

I'd like to run a script like this:

 

  • estoolkit -run path/to/myscript.jsx

 

For example, to get Adobe Illustrator to do something from the command line.

 

How can I get estoolkit? If that's not possible, then how can I run the script from the command line?

TOPICS
Scripting

Views

440

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 31, 2024 Aug 31, 2024

ESTK is no longer supported. It still works on Windows only because it still supports 32 bit programs. Macs won't install or run ESTK.

 

If you're on Windows you can find and istall the ESTK through the the Creative Cloud App

Votes

Translate

Translate
Adobe
Community Expert ,
Aug 29, 2024 Aug 29, 2024

Copy link to clipboard

Copied

I don't know the answer, but I think people will want to know what platform—MacOS or Windows?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 29, 2024 Aug 29, 2024

Copy link to clipboard

Copied

This works on Mac... The `-a` flag tells the open command which program to open the file with.

 

open -a Adobe\ Illustrator ~/path/to/script.js

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 29, 2024 Aug 29, 2024

Copy link to clipboard

Copied

Hi @jduncan, that does indeed work, thanks! When I do it Illustrator gives me a warning:

Screenshot 2024-08-30 at 09.30.30.png

Is that security check something that we can turn off?

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

Hey, you just need to set the app preferences 'ShowExternalJSXWarning' to false. This can be done by running the simple script below. FYI, this is the same pref that lets you easily run scripts by drag-and-drop into Ai.

 

app.preferences.setBooleanPreference('ShowExternalJSXWarning', false)

 

And, unfortunately, the link provided by Adobe in the dialog doesn't link to anything that helps. The relevant link is here. Cheers!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

On Mac, use AppleScript. Paste the following into a new Script Editor document (/Applications/Utilities/Script Editor.app) and save as `aitool.applescript`:

 

#!/usr/bin/env osascript

property _name : "aitool"

on run argv
	if argv is {} then set argv to {"-h"}
	set opt to item 1 of argv
	set argv to rest of argv
	
	if {opt} is in {"-h", "--help"} then
		log "Usage:"
		log _name & " -h"
		log _name & " -o /path/to/file.ai [ file ... ]"
		log _name & " -r /path/to/file.jsx [ argument ... ]"
		
	else if {opt} is in {"-o", "--open"} then
		repeat with pth in argv
			set f to POSIX file pth
			try
				tell application "Adobe Illustrator" to open f without dialogs
			on error msg number num
				log msg & " (" & num & ")"
			end try
		end repeat
		
	else if {opt} is in {"-r", "--run"} then
		set pth to item 1 of argv
		set argv to rest of argv
		set f to POSIX file pth
		try
			tell application "Adobe Illustrator"
				do javascript f with arguments argv
			end tell
		on error msg number num
			log msg & " (" & num & ")"
		end try
		
	else
		log "Unknown option: " & opt
	end if
	
end run

 

 

In Terminal.app, make it executable and move it to a directory that on your shell $PATH:

 

chmod +x aitool.applescript
sudo mv aitool.applescript /usr/local/bin/aitool

 

 

You can now run from Terminal, e.g.

 

aitool -r /Users/foo/myscript.jsx

 

 

Support for relative file paths, more robust error handling (e.g. file not found), etc is left as an exercise. (This may help.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

Very clever! Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 31, 2024 Aug 31, 2024

Copy link to clipboard

Copied

or...place the script in the secure "My Documents" folder to bypass the warning

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 31, 2024 Aug 31, 2024

Copy link to clipboard

Copied

LATEST

ESTK is no longer supported. It still works on Windows only because it still supports 32 bit programs. Macs won't install or run ESTK.

 

If you're on Windows you can find and istall the ESTK through the the Creative Cloud App

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines