I have the following Bash Script.
!#/bin/bash
fscanx --pdf /scandata/Trust_Report
if [ "$?" = "0" ]; then
I would like to run the following AppleScript
tell application "FileMaker Pro Advanced"
activate
show window "Trust Reports"
do script "Scan Trust Report"
end tell
else
say “It did not scan”
fi
What is the proper syntax to invoke this AppleScript?
Thank you
Use the
osascript
command. You can either pass the script as parameters using the-e
flag, like this (note it's not necessary to break this into multiple lines, I just do that to make it more readable):Or pass it as a here document, like this:
BTW, you don't need to test $? in a separate command, you can include the command you're trying to check the success of directly in the
if
statement: