osx - AppleScript Runner exit status passed back to shell script -
i need able run applescript in shell script. using "applescript runner" in order in interactive mode, dialogs etc. supported. i've got working, need exit status of applescript runner app shell, can see if there errors in script.
here shell script:
output=$(/usr/bin/osascript << eot tell application "applescript runner" script "somescript.scpt" end eot) status=$? here variable $status ends exit status of osascript command (which 0 whether or not somescript.scpt ran successfully), , not exit status of app applescript runner.
does 1 know how might accomplish this?
thanks!
the -e flag prints errors stderr , default. need read stderr.
this answer might if aren't familiar that:
bash variable capture stderr , stdout separately or exit value
edit: added sample code.
error=`osascript -e 'tell app "finder" adtivate' 2>&1` echo $error the above on system captures error messages.
Comments
Post a Comment