Apple Script for Unix Touch command within hazel rule.

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

Moderator: Mr_Noodle

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?
justinkthornton
 
Posts: 26
Joined: Wed Aug 03, 2011 11:50 am

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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support