Re: Inventory script
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