Is hazel scriptable?

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

Moderator: Mr_Noodle

Is hazel scriptable? Thu Jun 28, 2007 12:53 am • by Quine
Just wondering, is there any way to tell hazel to run it's rules (or a subset of them) in applescript (or via the command line)?

If there isn't, could you make one please? Thanks :)
Quine
 
Posts: 15
Joined: Mon Mar 19, 2007 6:26 pm

Fri Jun 29, 2007 10:07 am • by Mr_Noodle
Didn't really think about making Hazel itself scriptable. Adding it to the feature DB. 2.0 is already in beta so it's a bit late for that but will consider it for a future release.

Could you tell me why you need to tell Hazel to run? Just want to make sure that there's no other way to get what you want.
Mr_Noodle
Site Admin
 
Posts: 11240
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Sat Jul 07, 2007 10:14 pm • by IDontDoWindows
You can script this via System Events, but it's a pain and I wouldn't recommend it. It is available, though.
IDontDoWindows
 
Posts: 57
Joined: Sun Jan 07, 2007 5:43 am

Mon Jul 09, 2007 3:02 pm • by Mr_Noodle
One other thought I had is that you could just run the "touch" command on the folder. This updates the modification time on the folder causing Hazel to wake up and process the folder. A shell script off the top of my head:
Code: Select all
#!/bin/sh

touch $1

where $1 is the first argument.

I probably should have thought of this before. Sorry about that.
Mr_Noodle
Site Admin
 
Posts: 11240
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mon Jul 23, 2007 4:19 am • by Quine
My main reason was, since 2.0 doesn't include a "run every X minutes" option, I figured it might be easier to make it very minorly scriptable so I could manually make it run on specified intervals. Also, being able to have each folder's rules run on different intervals would be awesome (some of my folders only need to be acted upon once a day anyways), and since the menubar access allows that, it'd be cool if it was accessible via applescript.

The memory usage of hazel 2.0 is a lot more than 1.0 so far, and I'm trying to cut down on background app memory usage, so that's the main reason I'd like to make it run a little less frequently.
Quine
 
Posts: 15
Joined: Mon Mar 19, 2007 6:26 pm


Return to Support