property RetrospectsBackupScript : "Test local"
tell application "Retrospect"
if executing of (Retrospect status of script RetrospectsBackupScript) is false then
tell application "System Events"
say "False"
end tell
else
tell application "System Events"
say "True"
end tell
end if
end tell
Running this script without the «Tell application “System events”» statement, gives an error message «Retrospect error: “False” does not understand “Say”».
Is there a simpler way to script the «Say» command without having to add a TELL statement every time it is nested in another TELL statement ?
say is a command of Standard Scripting Additions which doesn’t require any target application.
It’s also recommended to avoid nested application tell blocks as in your script and use the tell blocks only for those lines,
which contains terminology of this specific application.
I don’t have Retrospect so don’t know the proper syntax, but your script could look like
property RetrospectsBackupScript : "Test local"
tell application "Retrospect" to set execStatus to executing of (Retrospect status of script RetrospectsBackupScript) as text
say execStatus
Considering your reply, the only reason for which the SAY statement generated an error, seems to be related to Retrospect. Retrospect runs in ROOT.
Your script gives an error when Retrospect is open and running a backup script. It works fine when not running the backup script though. It is the same situation when trying to retreive a Status from Retrospect. It’s seems Retrospect blocks calls when executing something.