Re: System Profiler dictionary in 10.3?
Re: System Profiler dictionary in 10.3?
- Subject: Re: System Profiler dictionary in 10.3?
- From: Graff <email@hidden>
- Date: Sat, 24 Jan 2004 14:49:39 -0500
Here's a little bit more direct method of getting the serial number.
It uses the command-line version of System Profiler so you don't need
to open and close System Profiler.app:
-------------
set serialNum to do shell script "system_profiler SPHardwareDataType |
awk '/Serial/ { print $3 }'"
-------------
- Ken
On Jan 24, 2004, at 1:30 AM, Waldrip, Chris wrote:
I'm trying to write a script, in Panther, that copies the Serial
Number from the System Profiler and pastes it into the Computer Name
in the Sharing preference pane.
It seemed simple, until I figured out that neither the System Profiler
nor the System Preferences were recordable (at least actions aren't
recorded when I try it using the ScriptEditor). I'm new to
AppleScripting, but figured I could at worse look at the dictionaries
for the two applications and find examples on the web. But there are
no unique dictionary settings for the System Profiler in 10.3.
I've tried the examples for the System Profiler found in AppleScript
in a Nutshell, but they're all for 10.2.
While I'd be ever so grateful for a prewritten script (*grin*), I'd be
happy with information on how to at least get started.
Thanks in advance for any help or suggestions...
_______________________________________________
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.