Re: One for the experts: Serial Number of computer using Applescript Studio
Re: One for the experts: Serial Number of computer using Applescript Studio
- Subject: Re: One for the experts: Serial Number of computer using Applescript Studio
- From: Neil Faiman <email@hidden>
- Date: Fri, 18 Mar 2005 07:12:47 -0500
On Mar 18, 2005, at 4:45 AM, Andrew Oliver wrote:
On 3/18/05 1:13 AM, "Michelle Steiner" <email@hidden> wrote:
...
tell application "System Profiler"
set foo to system profile
paragraph 13 of foo
end tell
...
This might work for now, but it probably won't work when Apple change
the
output of System Profiler to include more information and the Serial
number
moves to line 14 or 15...
But this will work, as long as the profile contains a line with phrase
"Serial Number:"
tell application "System Profiler"
set sn to ""
set sp to system profile
repeat with p in paragraphs of sp
if p contains "Serial Number:" then
set sn to contents of p
exit repeat
end if
end repeat
sn
end tell
_______________________________________________
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