Adobe-CEP / Samples

Code samples for CEP extensions
MIT License
970 stars 551 forks source link

Typescript Typings for Illustrator, etc. #85

Open habemus-papadum opened 6 years ago

habemus-papadum commented 6 years ago

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

bbb999 commented 6 years ago

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.

Jolg42 commented 6 years ago

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

habemus-papadum commented 6 years ago

@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.

bbb999 commented 6 years ago

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).

habemus-papadum commented 6 years ago

should of known... thanks.

haysclark commented 2 years ago

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.