Re: GUI Scripting to toggle "Announce Time"?
Re: GUI Scripting to toggle "Announce Time"?
- Subject: Re: GUI Scripting to toggle "Announce Time"?
- From: TjL <email@hidden>
- Date: Mon, 30 Jul 2007 00:32:58 -0400
On Jul 29, 2007, at 2:55 PM, Ed Stockly wrote:
tell application "System Preferences"
activate
reveal anchor "Clock" of pane "Date & Time"
tell application "System Events"
tell application process "System Preferences"
tell window 1
tell group 1 of tab group 1
if value of checkbox "Announce the time:" = 1 then
click checkbox "Announce the time:"
end if
end tell
end tell
end tell
end tell
end tell
Many thanks! Works splendidly! I also made a version to turn it ON
which also unmutes the Mac, under the theory that if one wants the
time announced, having the sound on would be a good idea too! It
also quits System Preferences once done (since I'll probably be
running this programmatically, and I hardly ever have SP open, this
probably won't cause any problems for me.
tell application "System Preferences"
activate
reveal anchor "Clock" of pane "Date & Time"
tell application "System Events"
set volume without output muted
tell application process "System Preferences"
tell window 1
tell group 1 of tab group 1
if value of checkbox "Announce the time:" = 0 then
click checkbox "Announce the time:"
end if
end tell
end tell
end tell
end tell
quit
end tell
_______________________________________________
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