• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: International Colors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: International Colors


  • Subject: Re: International Colors
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 05 Nov 2011 16:08:15 -0500

On Nov 5, 2011, at 2:50 PM, Robert Poland wrote:

I get an error…

Oops! Use this ...

try
(path to preferences from user domain)
tell application "Finder" to set labelFile to (file "com.apple.Labels.plist" of the result) as alias
tell application "System Events" to set colorRec to (value of property list file (labelFile as text))
set labelList to {"Unread" & tab & tab & "7", ""} -- Gray,7
set labelList to (labelList & {|Label_Name_6| of colorRec & tab & tab & "2"}) -- Red,2
set labelList to (labelList & {|Label_Name_7| of colorRec & tab & tab & "1"}) -- Orange,1
set labelList to (labelList & {|Label_Name_5| of colorRec & tab & tab & "3"}) -- Yellow,3
set labelList to (labelList & {|Label_Name_2| of colorRec & tab & tab & "6"}) -- Green,6
set labelList to (labelList & {|Label_Name_4| of colorRec & "   " & tab & tab & "4"}) -- Blue,4
set labelList to (labelList & {|Label_Name_3| of colorRec & tab & tab & "5"}) -- Purple,5
set labelList to (labelList & {"", "Outdated" & tab & "0"}) -- unlabeled,0
on error
set labelList to {"Unread" & tab & tab & "7", "", "Red   " & tab & tab & "2", "Orange" & tab & tab & "1", ¬
"Yellow" & tab & tab & "3", "Green" & tab & tab & "6", "Blue   " & tab & tab & "4", "Purple" & tab & tab & "5", "", "Outdated" & tab & "0"}
end try

tell me to choose from list the result with title "title" with prompt "Choose a label to show ..." default items {item 1 of the result} OK button name "Show"

And after reading the other comments, I guess this does not work as I had hoped. Darn!

 _______________________________________________
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

References: 
 >detect return, expanded (From: Robert Poland <email@hidden>)
 >International Colors (From: Luther Fuller <email@hidden>)
 >Re: International Colors (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: International Colors
  • Next by Date: Re: International Colors
  • Previous by thread: Re: International Colors
  • Next by thread: Re: International Colors
  • Index(es):
    • Date
    • Thread