Page 1 of 1

Acting on a Folder Based on its Contents

PostPosted: Thu Aug 30, 2007 1:53 pm
by Peeja
I'm using the Ethan's Kinkless desktop system and playing with the rules a bit. I'd like to label my Inbox red if anything inside has been labeled red. Is there any way to do this?

PostPosted: Thu Aug 30, 2007 3:24 pm
by Mr_Noodle
There's not a direct way to do this now. I am looking into some sort of way to specify things that operate on the parent folder.

Until then, the best thing to do would be a script. If you need any assistance on this, go ahead and post here. I know there are at least a couple other script people lurking around here besides me.

PostPosted: Fri Aug 31, 2007 11:48 pm
by IDontDoWindows
I whipped something up

Code: Select all
my hazelProcessFile(leFiche)

on hazelProcessFile(leFiche)
   
   tell application "Finder"
      try
         activate
         set label index of container of (leFiche as alias) to 3
         
      on error errMsg number errNum
         display dialog "Oops" & return & errNum & return & errMsg
      end try
   end tell
   
end hazelProcessFile

PostPosted: Tue Sep 04, 2007 12:29 pm
by Peeja
Thanks, IDontDoWindows!