Skip to main content
Inspiring
July 31, 2017
Answered

A way to call an Illustrator File/Script from another script?

  • July 31, 2017
  • 1 reply
  • 3106 views

If I have a script inside Illustrator's File/Script menu I would like to run from a script outside Illustrator.

The only code I found that might be related is:

app.executeMenuCommand("script name here?");

I'll take any examples in either VBscript or JavaScript. 

Thx,

Clutch

This topic has been closed for replies.
Correct answer clutch-cargo

Thx, I also think I found what I want using VBscript:

objApp.DoJavaScriptFile "path to JS file"

1 reply

Ten A
Community Expert
Community Expert
July 31, 2017

You can use the execute method under the File object, Not executeMenuCommand.

var f = new File("YOUR SCRIPT FILE PATH HERE");

f.execute();

clutch-cargoAuthorCorrect answer
Inspiring
July 31, 2017

Thx, I also think I found what I want using VBscript:

objApp.DoJavaScriptFile "path to JS file"