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

How to edit script files?

Community Beginner ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

In the application folder of Illustrator, there are sample scripts that end in .jsx.  I'd like to edit them.   However, I can't open them in any of the usual script editors.  For example, I just download an app off the applie store called BBBEdit. When I try to open the sample  scripts with this program,  the .jsx files are grayed out.  why is this?

 

Screen Shot 2021-11-28 at 11.31.16 AM.png

TOPICS
Scripting

Views

2.0K

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

Engaged , Nov 29, 2021 Nov 29, 2021

The files will be greyed because that the app doesn’t recognize their filename extensions. The scripts in Illustrator’s Scripting folder have read-only permissions so can be opened but not saved (at least, not without Admin permissions).

 

Adobe no longer supports ESTK, which is a 32-bit app that won’t run on macOS 10.15+. OP can use BBEdit if that’s what they’re familiar with; they just need to update its Language preferences to recognize ,jsx files. They can also put this crude but convenient Ap

...

Votes

Translate

Translate
Adobe
Community Expert ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

Try the forum for Illustrator. 

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 Beginner ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

Yea, after I posted this I wanted to remove it right away, but I can't figure out how.

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 ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

You may contact the moderator using the "Report" tool and send them a message to move this thread to the appropriate forum.

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 ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

From what I'm reading you should be able to open these type of files with any text editor, .

 

If they  appear greyed could it be because of read-only attributes to the file(s)? In which case, maybe using administrator rights could lower  the restrictions of folder that they reside in.

 

However, from reading other guidance outside of these forums, if you're actually trying to edit JavaScript XML code, use a source code editor which will aide you with the proper syntax and the formatting of the scripted file.

 

I would say to use the Adobe Extend Toolkit CC: https://www.adobe.com/products/extendscript-toolkit.htmlESTK 

 

See if this discussion helps with what you're looking for: https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-download-extendscript-toolkit-...

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

The files will be greyed because that the app doesn’t recognize their filename extensions. The scripts in Illustrator’s Scripting folder have read-only permissions so can be opened but not saved (at least, not without Admin permissions).

 

Adobe no longer supports ESTK, which is a 32-bit app that won’t run on macOS 10.15+. OP can use BBEdit if that’s what they’re familiar with; they just need to update its Language preferences to recognize ,jsx files. They can also put this crude but convenient AppleScript in its Scripts menu if they wish:

 

-- Run Script in Illustrator.scpt
-- run the front BBEdit window as JSX in Illustrator

tell application "BBEdit"
	set txt to text of document 1
end tell

tell application "Adobe Illustrator"
	activate
	with timeout of 30 seconds
		do javascript txt
	end timeout
end tell

 

The big disadvantage of using BBEdit or other editor is no debugger support. That’s especially aggravating if a script gets stuck in an infinite loop. VSCode is not the most beautiful app (typical Electron), but it’s what Adobe supports now so depending on OP’s scripting ambitions they may be best with that.

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

LATEST

Thank you very much for clarifying. Rookie here.

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 ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

MOVED TO THE ILLUSTRATOR FORUM

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

In BBEdit, go to Preferences > Languages and add 2 entries to the Custom filename extension mappings:

 

jsx ➞ JavaScript

jsxinc ➞ JavaScript

 

You might also consider using Visual Studio Code. Adobe provides an ExtendScript plugin that adds debugger support.

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