• 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: Setting the computer name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting the computer name


  • Subject: Re: Setting the computer name
  • From: pete boardman <email@hidden>
  • Date: Wed, 14 Sep 2005 09:11:36 +0100

On 13 Sep 2005, at 22:03, email@hidden wrote:


tell application "System Preferences" to activate
tell application "System Preferences to set current pane to pane
"com.apple.preferences.sharing

tell application "System Events"
    set value of text field 1 of window "Sharing" to compName
end tell

I'm stumped and stuck and would appreciate a shove in the right direction.


Looks like you're not actually targetting System Preferences at this point. How about this:


tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preferences.sharing"
end tell

tell application "System Events"
    tell process "System Preferences"
        set value of text field 1 of window "Sharing" to compName
    end tell
end tell


Pete

_______________________________________________
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


References: 
 >Setting the computer name (From: email@hidden)

  • Prev by Date: [BUG] saving as run-only
  • Next by Date: Re: Converting Mac Roman and/or UTF 16 to UTF 8?
  • Previous by thread: Setting the computer name
  • Next by thread: Re: Setting the computer name
  • Index(es):
    • Date
    • Thread