Apple Script for Unix Touch command within hazel rule.

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

Moderator: Mr_Noodle

Apple Script for Unix Touch command within hazel rule.

Postby justinkthornton » Tue Aug 09, 2011 1:44 pm

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

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

Postby Mr_Noodle » Wed Aug 10, 2011 2:52 pm

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: 2920
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests



Copyright © 2006-2012 Noodlesoft, LLC, All Rights Reserved. Mac and the Mac logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries.