This is the AppleScript template:
tell application "Adobe Photoshop CS5"
set theFile to alias “Application:Documents:MyFile” open theFile
do javascript (file <path to Emboss.jsx>) with arguments { 75,2,89 }
end tell
And I would like to translate that to Python appscript. Unfortunately, I cannot figure out how to translate the do javascript
. Any ideas?
I don't even know how to find it out. Maybe I know AppleScript too less. Is do
a keyword? Or is it a command I am sending to the application? Is javascript
a parameter of do
? Or does do javascript
belong together (as a command with a space)?
To translate generic AppleScript
to appscript
, use the ASTranslate
tool available from the appscript
web site here. It is not always able to successfully translate due to the quirks and bugs in the script definitions of some applications but it is a good place to start.