Page 1 of 1

Apple Script for Unix Touch command within hazel rule.

PostPosted: Tue Aug 09, 2011 1:44 pm
by justinkthornton
I'm starting to link rules together to run one right after another. But sometimes hazel is a be slow to make to run the rules. Mr_Noodle said a way to speed things up is by using the hazel touch command on the folder that has that particular rule.

What I want to do is have the rule that happens before the current rule run an applescript that waits 2 sec or so then runs a the unix touch command. I've done some googling and have found no way to run the unix touch command within an applescript. Anyone know?

Re: Apple Script for Unix Touch command within hazel rule.

PostPosted: Wed Aug 10, 2011 2:52 pm
by Mr_Noodle
Is there a reason why it has to be AppleScript? The following shell script would do it:
Code: Select all
sleep 2
touch "$1"

Otherwise, you can do an AppleScript to execute a shell script which seems a bit roundabout to me.