Add Support for FAILURE of scripts

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Add Support for FAILURE of scripts Wed Aug 20, 2014 2:05 pm • by dredhorse
Hi,

atm you can only use filters with a passes applescript / bash.

It would be nice to be able to say NOT passes applescript etc as that would allow to have one script to check specific conditions instead of needing to code 2 scripts.
Regards

Don
dredhorse
 
Posts: 20
Joined: Mon Aug 11, 2014 4:39 pm

Re: Add Support for FAILURE of scripts Thu Aug 21, 2014 12:15 pm • by Mr_Noodle
Can you give me a specific case where you need this?
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Add Support for FAILURE of scripts Sat Aug 23, 2014 11:36 am • by dredhorse
I have an applescript to check if a pdf has been processed with ocr.

And I have an other applescript to check if a pdf has NOT been processed with ocr.

In the end the scripts are the same except that one time the if statement is true and I pass a true, and in the other time the if statement is true and I pass a false back to hazel.

So I need to write 2 scripts... hmm.. or have one script with a switch , but still...
Regards

Don
dredhorse
 
Posts: 20
Joined: Mon Aug 11, 2014 4:39 pm

Re: Add Support for FAILURE of scripts Mon Aug 25, 2014 2:03 pm • by Mr_Noodle
Do you really need to identify both or can you just use the rule fall-through to "detect" the negative case? For instance, if one rule has that script, then anything that doesn't match that rule is basically implied to not match it. Subsequent rules can basically operate under that assumption.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Add Support for FAILURE of scripts Mon Aug 25, 2014 3:53 pm • by dredhorse
need to check that, will let you know.
Regards

Don
dredhorse
 
Posts: 20
Joined: Mon Aug 11, 2014 4:39 pm


Return to Open Discussion