Samples icon indicating copy to clipboard operation
Samples copied to clipboard

Typescript Typings for Illustrator, etc.

Open habemus-papadum opened this issue 6 years ago • 6 comments

Hi -- The Typescript example is really useful, but seems to only have typings for Premiere. Is there any chance Adobe could generate typings for its other products? In particular, I'm interested in Illustrator. Cheers! nehal

habemus-papadum avatar May 27 '18 21:05 habemus-papadum

The Premiere-focused TypeScript work was a labor of love by a TypeScript fan. You're welcome to emulate his fine work, but I doubt whether the Illustrator team is planning on releasing TypeScript-related sample code, any time soon.

bbb999 avatar May 28 '18 14:05 bbb999

@habemus-papadum You should check https://github.com/pravdomil/Types-for-Adobe (I didn't try it yet though but it looks good!)

Jolg42 avatar May 28 '18 14:05 Jolg42

@Jolg42 -- yup this is the path... Thanks!

Adobe-CEP (@bbb999 ?): As a compromise, is there any chance that Adobe-CEP would make (more easily) available the object schema xml files bundled with the ExtendScript Toolkit -- particularly, ExtendScript Toolkit no longer installs on newer MacOs's, which makes using https://github.com/pravdomil/extendscript-xml-to-typescript difficult.

habemus-papadum avatar May 28 '18 15:05 habemus-papadum

The Fruit Company’s tedious warnings in recent OSX versions aside, ESTK’s easily installed from with the installer’s bundle (“show package contents” is your friend).

bbb999 avatar May 28 '18 15:05 bbb999

should of known... thanks.

habemus-papadum avatar May 28 '18 15:05 habemus-papadum

This repo has Illustrator 2015.3 types that can get you started. aenhancers/Types-for-Adobe

I took that work and then used pravdomil/extendscript-xml-to-typescript to generate Illustrator types from the omv.xml

sudo npx extendscript-xml-to-typescript /Library/Application\ Support/Adobe/Scripting\ Dictionaries\ CC/Illustrator\ 2022/omv.xml

The generated type file is a great start, but you need to manually correct all of the 'collections', some static items, Points, and Rect (Rectangles). I've posted a GitHub Gist of my Illustrator 26.0.3 (WIP) TS types.

haysclark avatar Apr 05 '22 17:04 haysclark