This question already has an answer here:

Using the path defined in bash shell How would i pass the variable to applescript using osascript/applescript? Here's what I have so far.. The path of $FOOD_NUM is subject to change and it must be a variable that I have defined in bash. The "-e open... doesn't seem to like the path. error code 810:815: execution error: The variable input is not defined. (-2753 Thanks!.

osascript -e 'tell application "Adobe Photoshop CC 2017"'
-e 'open "'$FOOD_file/$FOOD_NUM/apples.psd'"' -e 'end tell'

marked as duplicate by JBis, user3439894, Monomeeth Oct 30 '18 at 5:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Instead of using Applescript to open Photoshop, why not just open it directly with the open command in bash?

open -a "Adobe Photoshop CC 2017" $FOOD_file/$FOOD_NUM/apples.psd

Now you don't need to worry about using Applescript at all.

Not the answer you're looking for? Browse other questions tagged .