Skip to main content
1114062249
Participant
December 7, 2022
Answered

How can I execute script using command line(Terminal) in MAC?

  • December 7, 2022
  • 1 reply
  • 1012 views

In Windows, executing Illustrator with script file path string executes script.

For example, when Illustrator is running, command line below executes script "C:\Users\user\tmp.js" 

"C:\Program Files\Adobe\Adobe Illustrator 2022\Support Files\Contents\Windows\Illustrator.exe" "C:\Users\user\tmp.js"

 

But in MAC, this kind of thing doesn't work.

when Illustrator is running, executing terminal below does not execute script "Applications/Adobe Illustrator 2022/tmp.js". 

open "/Applications/Adobe Illustrator 2022/Adobe Illustrator.app" --args "Applications/Adobe Illustrator 2022/tmp.js"

 

How can I do this in MAC?

This topic has been closed for replies.
Correct answer jduncan

This works for me... The `-a` flag tells the open command which program to open the file with.

open -a Adobe\ Illustrator ~/test.js

 

1 reply

jduncan
Community Expert
jduncanCommunity ExpertCorrect answer
Community Expert
December 7, 2022

This works for me... The `-a` flag tells the open command which program to open the file with.

open -a Adobe\ Illustrator ~/test.js