Eval expensive condition only when other conditions are met

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

Moderator: Mr_Noodle

Hi again

As said I got the Applescript part with returning a custom attribute back to Hazel working:

Image

However the Applescript condition (which subsequently calls a shell script) is a bit more expensive than the other conditions and it errors out when the input is not as expected.

So I would like to test the Applescript condition only when the other conditions are met. - How can I do this?

Thanks for pointers.
halloleo
 
Posts: 59
Joined: Thu Apr 27, 2017 10:10 pm

Not that preview is different than actually running it. When the rules are run, it will not evaluate conditions it doesn't need to. For preview, it evaluates all conditions no matter what so you can debug things.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Not that preview is different than actually running it. When the rules are run, it will not evaluate conditions it doesn't need to.


Good to know - and good enough for me. :-)

Thanks for this.
halloleo
 
Posts: 59
Joined: Thu Apr 27, 2017 10:10 pm


Return to Support