• 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: Get System Info - Hey Oakley
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get System Info - Hey Oakley


  • Subject: Re: Get System Info - Hey Oakley
  • From: Bill Metzinger <email@hidden>
  • Date: Sun, 4 Apr 2004 15:50:59 -0400

On Apr 1, 2004, at 7:53 PM, Oakley Masten wrote:

> I have looked at the dictionary of the "Apple System Profiler"
> and have been able to get the whole profile as a document.
> BUT can not get individual parts.

> How would I go about getting just the "user name" or "ethernet address"
> or "RAM available" etc ?

Has anyone helped you with your problem?
The syntax of all of this depends upon your system. You didn't mention
that, but you did mention Apple System Profiler.
On Panther there is no Apple System Profiler, there is simply a System
Profiler. It returns the whole profile in one big text file. You then
need to read thru it for what you're after.
In the moldy oldie days of say 9.2, Apple System Profiler returned
individual objects like AppleTalk address - (your ethernet address or
MAC address.)
System profiler won't tell you available RAM, just installed RAM.

tell application "Apple System Profiler" to ,
return {physical RAM size, AppleTalk address}


If you are reading thru a single text file of your profile then
something like this will give you anything you're after.

tell application "System Profiler"
set x to system profile
end tell
repeat with p from 1 to count paragraphs of x
set y to paragraph p of x
if y contains "User Name:" then ,
set a to words 3 thru -1 of y as text
if y contains " Memory:" then ,
set b to words 2 thru -1 of y as text
if y contains "Ethernet Address:" then ,
set c to words 3 thru -1 of y as text
end repeat
return {a, b, c}

> thanks in advance

You're welcome.

.DS_Bill

} What manner of man are you
} that can summon up fire without flint or tinder?
} I -- am an enchanter.
} By what name are you known?
} There are those that call me Tim.
_______________________________________________
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.


  • Prev by Date: Re: Strange error reading file...
  • Next by Date: Return of the Dummy(ies)
  • Previous by thread: Re: Copy and Paste Style?
  • Next by thread: Return of the Dummy(ies)
  • Index(es):
    • Date
    • Thread