Automate a Hazel Rule with a script, shortcut or ...

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

Moderator: Mr_Noodle

Hi

Has anybody been able to turn on or off a rule from outside of Hazel?
Either by a script, Mac shortcut, Key macro or....

Thanks beforehand.
MortenBrun
 
Posts: 5
Joined: Thu Mar 25, 2021 10:15 am

Hazel has AppleScript support for that.
Mr_Noodle
Site Admin
 
Posts: 11280
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Hazel has AppleScript support for that.


Thanks your response, but where can I find some examples and/or documentation?

/morten
MortenBrun
 
Posts: 5
Joined: Thu Mar 25, 2021 10:15 am

You can search around for general AppleScript tutorials. The manual has some specifics about how to use the AppleScript with Hazel.
Mr_Noodle
Site Admin
 
Posts: 11280
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Another option is to save an empty file (such as with “echo > flag” whenever you want the rule to be active (or inactive), and then check for the presence (or absence) of the file “flag” as one of the rule’s triggering conditions.
smm
 
Posts: 8
Joined: Sun Oct 25, 2015 10:28 am


Return to Support