• 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
Getting Computer Name of Sharing Pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting Computer Name of Sharing Pane


  • Subject: Getting Computer Name of Sharing Pane
  • From: Jeffrey Berman <email@hidden>
  • Date: Fri, 09 May 2003 13:03:50 -0500

With OS X, is there a simple way to have a script get the computer name
listed in the Sharing pane of System Preferences?

I found I can get the name with the following:

do shell script "awk '/ComputerName/ " &
"{{{getline} print substr($0,12,length($0)-20)} exit}'" &
" /private/var/db/SystemConfiguration/preferences.xml"

but surely there must be a more straightforward solution.

-Jeffrey Berman
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting Computer Name of Sharing Pane
      • From: Jeffrey Berman <email@hidden>
  • Prev by Date: Re: Order of operations (was: Eigenvalues &/or eigenvectors, anyone?)
  • Next by Date: triggering an AppleScript
  • Previous by thread: photo cataloguing script
  • Next by thread: Re: Getting Computer Name of Sharing Pane
  • Index(es):
    • Date
    • Thread