Re: Finding Installed Memory Total
Re: Finding Installed Memory Total
- Subject: Re: Finding Installed Memory Total
- From: "Johnny AppleScript" <email@hidden>
- Date: Thu, 17 Jul 2003 08:58:37 -0600
On 03/07/17 04:21 AM, "Richard Morton" <email@hidden> wrote:
>
No need for a shell script. 'system attribute' (from Standard
>
additions) gets this using a Gestalt Selector:
>
>
system attribute "ram " -- trailing space required
>
>
This also works in classic MacOS with a slightly different (and forward
>
compatible) syntax:
>
>
tell app "Finder to get computer "ram "
I thought it was odd I was resorting to shell for this! I know I've got
oodles of legacy scripts that report RAM, but I didn't have any of my
reference materials with me and my brain was too tired to comply. Looked at
Standard Additions, but failed to properly explore system attribute (am I
the only one that wishes the dictionaries included at least one or two usage
examples?).
Anyway, thanks for the alternative, which finished, is:
set totalMB to ((system attribute "ram ") as number) / 1024 / 1024 & " MB"
as string
--> "1536.0 MB"
Cheers
JA
_______________________________________________
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.