Scripting the Colors palette
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