Build the script as a string, then pass that string to osascript
.
script = """ set strPath to POSIX file "$default"
POSIX path of (choose file with prompt "Pick a file:" default location strPath)
"""
read(`osascript -e $script`, String)
Build the script as a string, then pass that string to osascript
.
script = """ set strPath to POSIX file "$default"
POSIX path of (choose file with prompt "Pick a file:" default location strPath)
"""
read(`osascript -e $script`, String)