Make hazel condition test to stop on first negative result ?

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

Moderator: Mr_Noodle

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
mickaelperrin
 
Posts: 3
Joined: Fri Jun 15, 2018 5:43 am

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.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support