Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Applescript: PathLabeller' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Applescript: PathLabeller
Authored by: sinjin on Nov 24, '04 02:49:15PM
Glad you like it!
Heh, I figured out why I get the error message: I need to replace "1.Work" in your script with the name of the topmost folder on my own Mac, which, for my purposes, will be "Documents".
Yup. If you don't name the top most folder correctly it will try to keep labelling up to the root level of your drive and reach and error when it can't get any further. Sorry I wasn't more clear that you needed to change it!

The script is pretty bare (no error trapping, etc) so one could add dialogs and handlers to deal with user "mistakes" if they wanted to make it more accessible to others. For example, the script will die if you enter anything other than 0 through 7. With coersion and "try" handlers you could get it to kick back to the user for a valid label entry. You could even get it to accept text (e.g "Red") instead of numbers to be more intuitive, which gets me to your next problem...

Still have no idea why the colors/labels are shuffled around, though.
That isn't an error. For whatever reason the order you see the labels listed in contextual menus does not match their numerical order! There is probably a "legacy" reason for the integer value while the order in the menu is more pleasing to the eye, or something like that.

[ Reply to This | # ]