• 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: Finding Installed Memory Total
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Gestalt [was: Finding Installed Memory Total]
      • From: Richard Morton <email@hidden>
References: 
 >Re: Finding Installed Memory Total (From: Richard Morton <email@hidden>)

  • Prev by Date: Re: The Eudora mailbox challenge...
  • Next by Date: Finder window toolbar
  • Previous by thread: Re: Finding Installed Memory Total
  • Next by thread: Gestalt [was: Finding Installed Memory Total]
  • Index(es):
    • Date
    • Thread