Hi y’all
I need to be able to run a fairly complex JavaScript from within an AppleScript. I am quite a novice in Apple Scripting. I found out that I can use the do script command (the script is used with InDesign CS2), but no mather how I put it in the script, I get errors. This is what I tried so far:
– try 1
tell application “Adobe InDesign CS2”
set x to “/Applications/Adobe InDesign CS2/Presets/Scripts/Duplicate Page.js”
do script (POSIX file x) language javascript
end tell
– try 2
tell application “Adobe InDesign CS2”
do script “DuplicatePage.js” language javascript
end tell
I even attached a shortcut (F13) to the JavaScript in InDesign and used the System Events to invoke it, but nothing happens.
I really appreciate any help.
Thanks
Model: G5
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)