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

Scripting the Colors palette


  • Subject: Scripting the Colors palette
  • From: Fass-Holmes Barry <email@hidden>
  • Date: Sun, 15 Mar 2009 15:28:09 -0700

Hello,

When I execute the script below (to change the color of selected text in a Mail message), Script Editor displays an error sheet which reads Can’t get radio group "Maraschino" of window "Colors" of application process "Mail."

tell application "Mail" to activate
tell application "System Events"
	tell application process "Mail"
		keystroke "c" using {command down, shift down}
		delay 1
		tell window "Colors"
			tell radio group "Maraschino"
				tell radio button "Maraschino"
					click
				end tell
			end tell
		end tell
	end tell
end tell

Accessibility Inspector displays the following information for the Colors palette.

<AXApplication: “Mail”>
<AXWindow: “Colors”>
 <AXGroup: “Maraschino”>
  <AXGroup: “Maraschino”>
   <AXRadioGroup: “Maraschino”>
    <AXRadioButton: “Maraschino”>

Attributes:
  AXRole:  “AXRadioButton”
  AXRoleDescription:  “radio button”
  AXParent:  “<AXRadioGroup: “Maraschino”>”
  AXWindow:  “<AXWindow: “Colors”>”
  AXTopLevelUIElement:  “<AXWindow: “Colors”>”
  AXPosition:  “x=1136 y=557”
  AXSize:  “w=22 h=184”
  AXDescription:  “Maraschino”
  AXValue:  “1”

Actions:
  AXPress - press

What needs to be changed in the script so that it executes properly?

If the script contains "radiogroup" and "radiobutton" instead of "radio group" and "radio button," the script does not compile; instead Script Editor displays an error sheet.

Many thanks in advance!

Barry _______________________________________________
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
  • Follow-Ups:
    • Re: Scripting the Colors palette
      • From: KOENIG Yvan <email@hidden>
    • Re: Scripting the Colors palette
      • From: Philip Aker <email@hidden>
    • Re: Scripting the Colors palette
      • From: KOENIG Yvan <email@hidden>
    • Re: Scripting the Colors palette
      • From: Brian Christmas <email@hidden>
  • Prev by Date: Re: Is this a bug?
  • Next by Date: Re: Is this a bug?
  • Previous by thread: Re: Is this a bug?
  • Next by thread: Re: Scripting the Colors palette
  • Index(es):
    • Date
    • Thread