• 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: One for the experts: Serial Number of computer using Applescript Studio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: One for the experts: Serial Number of computer using Applescript Studio
      • From: David C Andrews <email@hidden>
    • Re: One for the experts: Serial Number of computer using Applescript Studio
      • From: yvan-koenig <email@hidden>
References: 
 >Re: One for the experts: Serial Number of computer using Applescript Studio (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Unicode Codepoints
  • Next by Date: Re: Unicode Codepoints
  • Previous by thread: Re: One for the experts: Serial Number of computer using Applescript Studio
  • Next by thread: Re: One for the experts: Serial Number of computer using Applescript Studio
  • Index(es):
    • Date
    • Thread