Page 1 of 1

Make hazel condition test to stop on first negative result ?

PostPosted: Fri Jun 15, 2018 7:33 pm
by mickaelperrin
Hi,

I have created a little confirmation popup which asks for confirmation of deletion of old files in my download folder.

I have added some other requirements before the execution of this script. However, even if those requirements are placed before my confirmation script, it gets always fired.

Is it possible to prevent Hazel to execute others rules in an "AND" condition block as soon as a requirement is not met ?

Image

If not, do you know how to safely move "theFile" to the trash ?

I tried
Code: Select all
tell application "Finder" to delete theFile as POSIX file
but it doesn't work.

Thanks

Re: Make hazel condition test to stop on first negative resu

PostPosted: Mon Jun 18, 2018 10:40 am
by Mr_Noodle
The preview will always execute all conditions so you can preview the value. When executing the rules, it should usually stop at the first failure though there are sometimes situations where it may keep evaluating.

For this type of thing, it's probably better to put that script in the action section.