• 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: Scripting the Colors palette
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting the Colors palette


  • Subject: Re: Scripting the Colors palette
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 18 Mar 2009 20:25:39 +0100

I'm pig headed so I got it and it's localization independant :

--[SCRIPT triggerColorPalette]
(*
I left the instructions which allowed me to get the description of items to trigger


Yvan KOENIG (Vallauris ,FRANCE)
18 mars 2009
*)

tell application "Mail"
	activate
	set wName to localized string "TOOLBAR_COLORS"
end tell

tell application "System Events"
tell application process "Mail"
if wName is not in (get name of windows) then keystroke "c" using {command down, shift down}

tell window wName --"Colors"
-- get description of UI elements
{"close button", "zoom button", "minimize button", "color well", "group", "button", "toolbar", "toolbar button", "text", "grow area"}
tell tool bar 1
--get help of buttons
(* {"Color Wheel", "Color Sliders", "Color Palettes", "Image Palettes", "Crayons"} *)
click button 5 (* to display "Crayons" *)
end tell -- tool bar
--get description of UI elements
(* {"group"} *)
tell group 1
get description of UI elements
tell group 1
--get description of UI elements
(* {"radio group"} *)
tell radio group 1
--get value of attribute "AXDescription" of UI elements
(*
{"Cantaloupe", "Honeydew", "Spindrift", "Sky", "Lavender", "Carnation", "Licorice", "Snow", "Salmon", "Banana", "Flora", "Ice", "Orchid", "Bubblegum", "Lead", "Mercury", "Tangerine", "Lime", "Sea Foam", "Aqua", "Grape", "Strawberry", "Tungsten", "Silver", "Maraschino", "Lemon", "Spring", "Turquoise", "Blueberry", "Magenta", "Iron", "Magnesium", "Mocha", "Fern", "Moss", "Ocean", "Eggplant", "Maroon", "Steel", "Aluminum", "Cayenne", "Asparagus", "Clover", "Teal", "Midnight", "Plum", "Tin", "Nickel"}
*)
click radio button 25 --"Maraschino"
end tell -- radio group
end tell
end tell
end tell
end tell
end tell


--[/SCRIPT]

Yvan KOENIG (from FRANCE mercredi 18 mars 2009 20:23:50)


_______________________________________________ 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: 
 >Scripting the Colors palette (From: Fass-Holmes Barry <email@hidden>)

  • Prev by Date: Re: timeout block question
  • Next by Date: Re: timeout block question (Axel Luttgens)
  • Previous by thread: Re: Scripting the Colors palette
  • Next by thread: Image events error
  • Index(es):
    • Date
    • Thread