gestalt

Syntax gestalt (selector)

Params selector is a string4 corresponding to one of the selectors defined by the Macintosh Gestalt Manager.

Action Calls the Macintosh Gestalt function with the indicated selector.

Returns The numeric response obtained from the Gestalt Manager, or -1 if the selector is undefined.

Examples gestalt ('mach') «check the machine type
» 18

The result indicates that we're running on a Mac IIsi

gestalt ('proc') «check the processor type
» 4

The result indicates that the CPU is a 68030

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Some similar information can be found in the Windows Registry using the "Registry verbs".

Notes This is an advanced verb that retrieves low-level information about the hardware and software operating environment. It's intention is to provide an escape valve for retrieving such information where it's not available through higher-level verbs.

The valid values for selector are documented in the Compatibility Guidelines chapter of Inside Macintosh, Volume VI (Addison Wesley).

Discuss