Copy link to clipboard
Copied
Hi,
Is there any way to run a javascript file from a plug-in? I'm thinking of attachjavascript filewith plug-in bundle in Mac resource and wondering if I can run that script from my plugin? Thank you!
Copy link to clipboard
Copied
Why do you need to run a javascript file from a plugin?
Is there anyway to do that using illustrator sdks? (no apis available for yours needs?).
Or shouldn't you develop an extension instead?
Thomas.
Copy link to clipboard
Copied
I think I looked into this for a customer about a year ago and concluded that there was no way to execute a script from code in Illustrator. You can of course run a script manually as a user by going to File > Script (or whatever it is) and picking one, but there isn't an API to do it from a plugin.
Copy link to clipboard
Copied
Since no APIs are available (Illustrator SDK) to complete this task, this should be delegated to an extension.
Copy link to clipboard
Copied
Thank you very much for your replies. The reason I want to run script from inside plugin is that I want to reuse the functionalities I've done in the script. Rewriting it in plugin is quite time consuming. It's too bad that we don't have any API for this. Could you please explain more about an extension? Is there any other way to reuse javascript in plugin?
Copy link to clipboard
Copied
Take a look at this link (CS5-CS6):
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/creativesuite/pdfs/CS_SDK_Guide.pdf
You should find everything you need.
You can use extensions if you want to extend Illustrator functionalities.
you can do that with c++ plugin as well.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now