• 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 System Preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting System Preferences


  • Subject: Re: Scripting System Preferences
  • From: kai <email@hidden>
  • Date: Wed, 30 Mar 2005 20:44:38 +0100


On Wed, 30 Mar 2005 16:48:48 +0200, Gunno Ivansson wrote:

Can one change the separator between hours, minutes and seconds from default
"." to ":" with an AppleScript?
If so, I would greatly appreciate some code examples.

You could use GUI scripting, Gunno.

The 'confirm' command doesn't seem to work properly here (at least, not in this case) - so the following example resorts to a little tabbing subterfuge:

-----------------

set tabKey to tab
tell application "System Preferences" to set current pane to pane "com.apple.Localization"
tell application "System Events" to tell process "System Preferences"
set frontmost to true
tell tab group 1 of window 1
tell radio button 3
click
repeat until value is 1
end repeat
end tell
tell text field -1 to set value to ":"
repeat 4 times
keystroke tabKey
end repeat
end tell
end tell
tell application "System Preferences" to quit


-----------------

---
kai

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Keychain and text returned
  • Next by Date: Keychain scripting starts Classic
  • Previous by thread: Scripting System Preferences
  • Next by thread: Capturing username for script that mounts server
  • Index(es):
    • Date
    • Thread