AppleScript error since Hazel 5.0.7

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

AppleScript error since Hazel 5.0.7 Sun May 23, 2021 7:37 am • by vco1
Since I installed Hazel 5.0.7 I'm getting an error on running an AppleScript:

AppleScript failed
Error on executing AppleScript on file scan_TEST.pdf


This error is consistent and started with Hazel 5.0.7.

The error is logged here (debug mode on):
Code: Select all
2021-05-23 13:12:06.974 hazelworker[61607] [Error] AppleScript failed: Error executing AppleScript on file /Users/stef/Documents/Scan Inbox/scan_TEST.pdf.
2021-05-23 13:12:06.974 hazelworker[61607] OSAScript error: {
    NSLocalizedDescription = "FineReader got an error: Could not execute the script because FineReader is busy processing a document. You can use the is busy command to determine FineReader's state.";
    NSLocalizedFailureReason = "Could not execute the script because FineReader is busy processing a document. You can use the is busy command to determine FineReader's state.";
    OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,1aa1aa \"FineReader\"]>";
    OSAScriptErrorAppNameKey = FineReader;
    OSAScriptErrorBriefMessageKey = "Could not execute the script because FineReader is busy processing a document. You can use the is busy command to determine FineReader's state.";
    OSAScriptErrorMessageKey = "FineReader got an error: Could not execute the script because FineReader is busy processing a document. You can use the is busy command to determine FineReader's state.";
    OSAScriptErrorNumberKey = 540094521;
    OSAScriptErrorRangeKey = "NSRange: {0, 0}";
}


This part in particular seems strange:
Could not execute the script because FineReader is busy processing a document. You can use the is busy command to determine FineReader's state.


as FineReader is not active. Or at least not before the Hazel rule activates it (via the AppleScript).

I get the impression something has changed in the timing of the execution of the steps within a rule.

Despite the error message , the Hazel rule does get executed fine in the end.

Could you please assist in solving this error?

Thanks in advance.

Edit: I changed the AppleScript to open ABBYY FineReader and included another wait step. That fixed the issue. The only thing that's still different from Hazel 5.0.6 is that ABBYY is running in the foreground. While it used to run behind all other open applications when started from Hazel.
vco1
 
Posts: 9
Joined: Mon Feb 15, 2021 3:04 pm

Re: AppleScript error since Hazel 5.0.7 Mon May 24, 2021 10:35 am • by Mr_Noodle
Nothing has changed on the AppleScript front. It's probably best to leave the delay in there.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support