Skip to main content
Inspiring
April 1, 2011
Question

[ILCS5] doJavascript in VB and JS

  • April 1, 2011
  • 1 reply
  • 1406 views

Hi All

I'm new in scripting for illustrator

In Applescript I can use "do javascript" to run an external JS file.

How can I do the same thing in VB and JS?

thanks

Ivan

This topic has been closed for replies.

1 reply

CarlosCanto
Community Expert
Community Expert
April 1, 2011

the VB syntax is

appRef.DoJavaScriptFile "C:\Users\<your name>\Documents\Adobe Scripts\yourJSfile.jsx"

there's no DoJavaScript in JS

Muppet_Mark-QAl63s
Inspiring
April 1, 2011

You may be able to…

$.evalFile(File('~/Desktop/AlertMeNow.jsx'));

Larry G. Schneider
Community Expert
Community Expert
April 1, 2011

Works, Mark. Great call to get a doScript possibility for ExtendScript. Just tried it with the Zoom script that Jongware rewrote.