Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Change Folder Label/Color Script

Change Folder Label/Color Script
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Santa Monica, CA, USA
Status: Offline
Reply With Quote
Jan 17, 2001, 05:26 PM
 
I am trying to create a folder action that would change the label/color of a folder, any time a new file is added. Should be simple, but I have tried everything and i still can't do it. Any help would be appreciated. Thanks
     
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Jan 19, 2001, 02:10 AM
 
Hi bforest,

One potential snag of which you may already be aware is that Folder Actions (FA) scripts which process added/removed items currently do not work unless the target/source folder is *open*. [However, you could work around this limitation by using the freeware third-party extension, Folder Actions Plus, as mentioned in some earlier threads in this Forum (e.g., the Copying across network? thread, or the AppleScript Folder Actions thread).]

If your folder is indeed open, but the FA script still isn't working, then please let us know the exact commands that you're using to change the folder's label, and I or someone else will try to figure out what's going wrong.

[BTW, typically, inside the 'on adding folder items to ...' handler, you could say something like:-
Code:
on adding folder items to theFolderVar after receiving theItemsVar -- [...] tell application "Finder" set (label index of theFolderVar) to n end tell -- [...] end adding folder items to
where theFolderVar is the folder-variable that you've specified in the handler's "header", and n is an integer between 0 and 7 inclusive (0 = "None", and 7 = "Project 2" or whatever customised "bottommost" label you've set up).]

Regards,

--Paul

[This message has been edited by Paul Crawford (edited 01-19-2001).]
     
RGS
Guest
Status:
Reply With Quote
Jan 19, 2001, 07:48 AM
 
I need some clarification...

When you drop a file into the folder with the attached folder action, you want that folder's (with the attached folder action) label to change? Random or specific label?
     
bforest  (op)
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Santa Monica, CA, USA
Status: Offline
Reply With Quote
Jan 19, 2001, 11:52 AM
 
RGS,

That is correct, I want to have a specific folder with a folder action attached to change to a specific color when an item is added. I can now do it, but only when the target folder is ope as stated above...haven't tried those 3rd part solutions. Thanks for the help
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2