Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript error -609 in Automator workflow

I created an AppleScript on one computer and incorporated it in an Automator workflow. The script works perfectly well stand-alone or as part of the workflow.

Then I copied both files to a headless computer via VNC. I adjusted the workflow to look at the new location of the script, and the script itself to look at the new location of the file it's processing. Now, on that second computer, the script works perfectly well by itself, but I get AppleScript error -609 Connection Is Invalid if it's run from the workflow.

For testing purposes I reduced the script to its simplest expression:
tell application "Finder"
end tell

and it's still generating the error.

Strangely, from the workflow the full script does what's it's supposed to, but the workflow stops because of the error. The error appears even if this script is alone in the workflow. Does anybody know what it means?

G4 Quicksilver 733, Mac mini Intel, eMac, Mac OS X (10.4.11)

Posted on May 7, 2008 12:55 PM

Reply
Question marked as Best reply

Posted on May 7, 2008 6:40 PM

That error means that the script wasn't able to communicate with the targeted application properly, which can happen if the application crashes while the script is running. If that error doesn't cause any problems, it's appearance can be suppressed:

try
(your code)
on error number -609
end try

This construct will not execute any code on or after the line which produces the error.

(32099)
2 replies
Question marked as Best reply

May 7, 2008 6:40 PM in response to Recycleur

That error means that the script wasn't able to communicate with the targeted application properly, which can happen if the application crashes while the script is running. If that error doesn't cause any problems, it's appearance can be suppressed:

try
(your code)
on error number -609
end try

This construct will not execute any code on or after the line which produces the error.

(32099)

May 10, 2008 4:07 PM in response to Niel

Thanks Niel

I'll remember this construct for future problems. In this particular project though, I just dropped Automator altogether and wrote my entire sequence in AppleScript. No error!

I still don't understand why this script worked fine with the same Automator flow on another computer with the same software versions. Ah! the joys of computing!

Regards
JL

AppleScript error -609 in Automator workflow

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.