Copy link to clipboard
Copied
Hi
There is a way to execute JavaScript via Applescript in InDesign using do script
tell application "Adobe InDesign CC 2014"
activate
do script "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx" language javascript
end tell
Since command do script doesn't work for Illustrator, Is there a way to tell via AppleScript to:
1. Execute Script from custom location (⌘cmd + F12)
2. Pick the script to be executed by name
Perhaps there is other work around to do this? Any support via OS X JavaScript?
Try this, HTH.
tell application "Adobe Illustrator" to open file "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx"
Copy link to clipboard
Copied
You should be able to use do javascript to do it, I believe.
Copy link to clipboard
Copied
I forgot to mention, that I'd like to keep the repository of JavaScripts in a custom folder (not Illustrator script folder).
Copy link to clipboard
Copied
do script is InDesign only. Not to confuse with do javascript which is available for AI & PS:
do javascript v : execute a javascript
do javascript any : javascript code or file to execute
[with arguments list of any] : arguments to pass to the JavaScript routine
[show debugger before running/never/on runtime error] : when should a debugger be shown? ( default: never )
→ text : execute a javascript
HTH
Loic
Copy link to clipboard
Copied
Try this, HTH.
tell application "Adobe Illustrator" to open file "Macintosh HD:Applications:MAMP:htdocs:extendscript-library.org:tests:test:fixtures:helper:log:test_log.jsx"
Copy link to clipboard
Copied
Nice. I wasn't aware of that. It looks like Illustrator only as nor InDesign, nor Photoshop accept that piece of code (given of course that the target application has been changed).
Copy link to clipboard
Copied
It worked up to Photoshop CS5, but I guess things have changed.
(I'm a CS6 user)