Getting Computer Name of Sharing Pane
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.