Start/Stop Hazel with AppleScript

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

Moderator: Mr_Noodle

Start/Stop Hazel with AppleScript 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.
Motive8
 
Posts: 11
Joined: Thu Jan 11, 2018 6:19 pm

Re: Start/Stop Hazel with AppleScript Tue Jan 30, 2018 11:35 am • by Mr_Noodle
Can you describe how you would use this?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Start/Stop Hazel with AppleScript 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
Motive8
 
Posts: 11
Joined: Thu Jan 11, 2018 6:19 pm

Re: Start/Stop Hazel with AppleScript 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?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Start/Stop Hazel with AppleScript 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?
Motive8
 
Posts: 11
Joined: Thu Jan 11, 2018 6:19 pm

Re: Start/Stop Hazel with AppleScript 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.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Start/Stop Hazel with AppleScript Thu Feb 01, 2018 8:19 pm • by Motive8
Always so helpful Paul. Great product and great service! Thanks!
Motive8
 
Posts: 11
Joined: Thu Jan 11, 2018 6:19 pm


Return to Support

cron