• 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: Inventory script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inventory script


  • Subject: Re: Inventory script
  • From: "J. Stewart" <email@hidden>
  • Date: Fri, 17 Jun 2005 16:37:31 -0400

On 06/17/05 at -0700 Gabe Lucero said this

>But now I have another problem. The part of the script that copies the
>seriel number from System Profiler into one of the Computer Inforamation
>fields copies the whole report not just the serial number.
>
>The applescript I used for retrieving the sn was from another thread:
>
>tell application "System Profiler"
>    set SN to system profile
>    last word of (paragraph (count paragraphs in (text 1 thru (offset of
>"Serial Number" in SN) of SN)) of SN)
>end tell
>
>It returns the serial just fine on it’s own. How do I put the result into a
>variable that I can paste into the info field?


This one liner works OMM with OS X 10.4.1

set SN to last word of (paragraph -2 of (do shell script "system_profiler SPHardwareDataType"))

JBS
--
The older we get, the fewer things seem worth waiting in line for.. — Will Rogers
 _______________________________________________
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

References: 
 >Re: Inventory script (From: Gabe Lucero <email@hidden>)

  • Prev by Date: Re: can't get version
  • Next by Date: Re: This AppleScript stuff is harder than I thought
  • Previous by thread: Re: Inventory script
  • Next by thread: Display Dialog is not frontmost in the Finder...
  • Index(es):
    • Date
    • Thread