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

Gestalt [was: Finding Installed Memory Total]


  • Subject: Gestalt [was: Finding Installed Memory Total]
  • From: Richard Morton <email@hidden>
  • Date: Fri, 18 Jul 2003 13:01:31 +1000

On Friday, July 18, 2003, at 12:58 AM, Johnny AppleScript wrote:

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

AFAIK, it's not documented in this form. The Finder version has this though, from the AS Finder Guide (circa 1994):

"The Computer command is a request for information about the local computers
operating environment.

This command is intended for use by programmers only. To use it, you should
be familiar with the Gestalt function as described in Inside Macintosh:Operating System Utilities."

I like the second sentence - scripters need not apply, it seems. ;-)

Old though it is, there is still quite a lot that's relevant in this document. Last time I looked it was available here:

<http://manuals.info.apple.com/Apple_Support_Area/Manuals/servers/ AppleScriptFinderGuide.PDF>

If you're running X, you should have a copy of the Gestalt header here:

<file:///System/Library/Frameworks/CoreServices.framework/Versions/A/ Frameworks/CarbonCore.framework/Versions/A/Headers/Gestalt.h>

And if you've installed the Dev Tools, you should have the Gestalt docs here:

<file:///Developer/Documentation/Carbon/oss/GestaltManager/ Gestalt_Manager/index.html>

Enjoy the light reading,

R Kane
-- Aren't we overdue for another "scripters vs programmers" debate..?
_______________________________________________
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:
    • Re: Gestalt [was: Finding Installed Memory Total]
      • From: Jon Pugh <email@hidden>
References: 
 >Re: Finding Installed Memory Total (From: "Johnny AppleScript" <email@hidden>)

  • Prev by Date: Printing from Quark 4.11 in OS 10.2.6
  • Next by Date: Controlling iTunes Remotely
  • Previous by thread: Re: Finding Installed Memory Total
  • Next by thread: Re: Gestalt [was: Finding Installed Memory Total]
  • Index(es):
    • Date
    • Thread