Re: International Colors
Re: International Colors
- Subject: Re: International Colors
- From: KOENIG Yvan <email@hidden>
- Date: Sun, 06 Nov 2011 21:08:41 +0100
Le 6 nov. 2011 à 20:06, Robert Poland a écrit :
A little more fuel for the fire:
set colors_loc to {} set newList to {}
repeat with i from 0 to 7 copy (round (abs i - 8) as integer) & "-" & ((my get_color_loc(i)) & ", ") to end of colors_loc end repeat
display dialog "" & colors_loc
repeat with i from 8 to 1 by -1 copy item i of colors_loc to end of newList end repeat
display dialog "" & newList
on get_color_loc(num) set p2l to (path to library folder from system domain) as text set path2res to p2l & "Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:" tell application "Finder" to return localized string ("Label_Name_" & num) from table "Labels" in bundle file path2res end get_color_loc
Robert Poland - Fort Collins, CO
CAUTION
This scheme return the color names defined at system level. It may be useful to complete it by a piece of code extracting possible custom names stored in the file :
(path to preferences from user domain) tell application "Finder" to set labelFile to (file "com.apple.Labels.plist" of the result) as alias
identified by Luther Fuller.
Yvan KOENIG (VALLAURIS, France) dimanche 6 novembre 2011 21:08:33
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden