Page 1 of 1

Notification only if a move did NOT work

PostPosted: Sun Mar 11, 2018 3:19 pm
by halloleo
I am building a set of rules filing email attachments (invoices from different suppliers) into folders. I save the attachments to one FileMe folder which I watch with Hazel. I check for file type and for the email address (plus other infos) in the "Where From" key and then file the PDFs into different destination folder.

So far so good. Sometimes though I rename or trash destination folders, so the rule cannot move the item. At the moment I get, I think, the first time the move works and the first time it fails a banner notification, but I like to get an alert every time it fails, preferably as bigger alert (like a dialog box).

How can I achieve this?

Re: Notification only if a move did NOT work

PostPosted: Mon Mar 12, 2018 11:08 am
by Mr_Noodle
You'll need to use AppleScript if you want a special UI to appear in this case.

Re: Notification only if a move did NOT work

PostPosted: Mon Mar 12, 2018 8:59 pm
by halloleo
Mr_Noodle wrote:You'll need to use AppleScript if you want a special UI to appear in this case.


Makes sense. Thanks.

For this how can I check in Hazel whether the file move worked or failed and then depending on this call a "display dialog" applescript?

Re: Notification only if a move did NOT work

PostPosted: Tue Mar 13, 2018 11:32 am
by Mr_Noodle
If an action fails, subsequent actions will not be run so having the script after the move action should be sufficient.

Re: Notification only if a move did NOT work

PostPosted: Tue Mar 13, 2018 7:24 pm
by halloleo
But I want exactly the opposite: Running the script exactly and only when the move action fails.

Re: Notification only if a move did NOT work

PostPosted: Wed Mar 14, 2018 10:43 am
by Mr_Noodle
Ah, that can't be done unless you do the move yourself in a script.