Page 1 of 1

Eval expensive condition only when other conditions are met

PostPosted: Fri Jul 19, 2024 9:13 pm
by halloleo
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.

Re: Eval expensive condition only when other conditions are

PostPosted: Mon Jul 22, 2024 8:40 am
by Mr_Noodle
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.

Re: Eval expensive condition only when other conditions are

PostPosted: Mon Jul 22, 2024 7:27 pm
by halloleo
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.