• 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: GUI Scripting to toggle "Announce Time"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: GUI Scripting to toggle "Announce Time"?
      • From: Jeff Porten <email@hidden>
References: 
 >Re: GUI Scripting to toggle "Announce Time"? (From: Ed Stockly <email@hidden>)
 >Re: GUI Scripting to toggle "Announce Time"? (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Network volume considerations when working with files?
  • Next by Date: Filemaker to text as rtf
  • Previous by thread: Re: GUI Scripting to toggle "Announce Time"?
  • Next by thread: Re: GUI Scripting to toggle "Announce Time"?
  • Index(es):
    • Date
    • Thread