Run 2019 jsx scripts from mac terminal
Is it still possible to run javascripts from mac terminal?
[This post moved from InDesign to InDesign Scripting by Moderator]
Is it still possible to run javascripts from mac terminal?
[This post moved from InDesign to InDesign Scripting by Moderator]
Hi Ibrahim,
You might wanna investigate osascript on MAC for your purpose, some samples that i could find that can point you in the right direction are mentioned in the link below
javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
Let us know how it goes.
-Manan
I did a quick test and it seemed to work, create a applescript file with the following text and save it. Change the path in do script to the path of the jsx that you want to execute
tell application "Adobe InDesign CC 2017"
do script "Macintosh HD:Users:Manan:Desktop:test.jsx" language javascript
end tell
Then open command prompt and run the following command
osascript path to your applescript file
This will launch indesign and execute your jsx.
Hope this helps
-Manan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.