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

10.4: Apply Finder labels based on application type Desktop
Tiger only hintHaving just bought a MacBookPro, I wanted a fast and easy way to see what apps I have that are universal, versus the ones that are PowerPC. This AppleScript will apply finder color labels to all of you applications. PowerPC apps are labeled grey, and Intel-only apps are labeled yellow. Universal Apps get no color label.

[robg adds: This earlier hint explained how to use Terminal to return a list of Intel-ready applications, and this hint used a different shell script to find all non-universal applications (with more nicely formatted output). This AppleScript, since it relies on the System Profiler report, will only work for applications located in the /Applications or ~/Applications folders, but it will traverse any subfolders of those directories as well.

If you want to remove the labels at some point, just modify the script so all instances of the set app_type... line read set app_type to 0, and then run it again. The script worked as described when I tested it on my Core Duo mini.]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[7,564 views]  

10.4: Apply Finder labels based on application type | 4 comments | Create New Account
Click here to return to the '10.4: Apply Finder labels based on application type' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Apply Finder labels based on application type
Authored by: palnudb on May 10, '06 10:12:28AM

On a labels related note is there away to add more labels that the default 7 colors?

Maybe I have 12 or 15 categories.

Just wondering?

Thanks
palnudb

---
--Those who like to work on there computers buy a PC. Those who like to do work on there computers buy Macs.



[ Reply to This | # ]
10.4: Apply Finder labels based on application type
Authored by: DEMON on May 10, '06 01:03:42PM

It doesn't work here. When I run the script I get a report of everything inside my Intel iMac and no labels are being put onto my apps.



[ Reply to This | # ]
10.4: Apply Finder labels based on application type
Authored by: alfrank on May 10, '06 01:51:05PM

I also have the problem that it doesn't work, but I found out why, and how to fix it:
My Mac OS is german and so the text labels in the system profiler report are different and in a different order because they're sorted alphabetically.

For a german Mac OS you have to replace them in the script as follows:

Applications: -> Programme:
Extensions: -> Protokolldateien:
Kind: -> Art:
Location: -> Ort:



[ Reply to This | # ]
10.4: Apply Finder labels based on application type
Authored by: darndog on May 15, '06 12:25:09PM
Small mod but I'd suggest it makes more sense to use Yellow for Intel, Blue for PPC and Green for Universal, seeing as Green is both a mix of Blue/Yellow and also generally means 'good to go'. Code alteration would be:
if the_line contains "Intel" then
	set app_type to 3
else if the_line contains "Universal" then
	set app_type to 4
else if the_line contains "PowerPC" then
	set app_type to 5
else
	set app_type to 1
end if


[ Reply to This | # ]