Page 1 of 1
Start/Stop Hazel with AppleScript

Posted:
Mon Jan 29, 2018 4:27 pm
by Motive8
I am looking for 2 simple AppleScripts. One to start Hazel and another script to stop Hazel. I am using Keyboard maestro and want to create a macro and I need an AppleScript to handle Hazel. Any help is greatly appreciated.
Re: Start/Stop Hazel with AppleScript

Posted:
Tue Jan 30, 2018 11:35 am
by Mr_Noodle
Can you describe how you would use this?
Re: Start/Stop Hazel with AppleScript

Posted:
Tue Jan 30, 2018 4:43 pm
by Motive8
Yes. I keep all my files in dropbox so with Hazel running all the time, my dropbox is always trying to sync. What I would like to do is be able to use keyboard Maestro to trigger an apple script which starts Hazel at a certain time and another script which turns Hazel off at a certain time. Keyboard Maestro does the rest.
So, an apple script that starts Hazel and another apple script which stops it. Thats it. I don't know much about Apple script, hence the question. Hoping someone could please offer a suggestion.
Many Thanks!
Marc
Re: Start/Stop Hazel with AppleScript

Posted:
Wed Jan 31, 2018 12:22 pm
by Mr_Noodle
How about using the "Current time" attribute in Hazel to only match during certain parts of the day?
Re: Start/Stop Hazel with AppleScript

Posted:
Wed Jan 31, 2018 12:34 pm
by Motive8
How would that work as for running all the rules? Would I have to add that to every rule?
Re: Start/Stop Hazel with AppleScript

Posted:
Thu Feb 01, 2018 11:22 am
by Mr_Noodle
You could add a rule at the top of the list like "Current time is after/before" and specify the range when the rules should NOT match. You can then use the "Ignore" action.
Re: Start/Stop Hazel with AppleScript

Posted:
Thu Feb 01, 2018 8:19 pm
by Motive8
Always so helpful Paul. Great product and great service! Thanks!