gestalt

Declaration

gestalt (code: INTEGER): VARIANT

Description

This is a general-purpose function that retrieves information about the system, application, and project. You pass a code to specify the piece of information to return.

Color_depth  

Number of bits used to show colors on the system.

4   16 colors
8   256 colors
16   High color (Windows) or thousands of colors (Mac)
32   True color (Windows) or millions of colors (Mac)
Screen_width  

Width of the main display in pixels. (Note: some display drivers on Windows return negative or large results, should do a sanity check on the number returned)

Screen_height   Height of the main display in pixels. (Note: some display drivers on Windows return negative or large results, should do a sanity check on the number returned)
Model   Type of computer. Some systems will return unknown and most modern Macs simply return 'PowerPC'
Cpu   Detail of the processor. Cyrix CPUs are reported incorrectly on Windows. Macs are just 'PowerPC'
Memory   Amount of RAM in Megabytes
User_name   Name the user used to log in to the network, if available
Computer_name   Name of the computer on the network, if available
System_name   Name of the operating system
System_version   String containing the full system version number (e.g. 1.1.1)
System_major_version   First number in the system version
System_minor_version   Second number in the system version
System_build_number   Third number in the system version
Engine_name   Name of the application (Logicat Test Engine)
Engine_version   String containing the full application version number (e.g. 1.1.1)
Engine_major_version   First number in the application version
Engine_minor_version   Second number in the application version
Engine_build_number   Third number in the application version
Project_name   Name of the project. Set this with set_project_name.
Project_version   String containing the full project version number (e.g. 1.1.1), including additional text (e.g. beta). Set this with set_project_version.
Project_major_version   First number in the project version
Project_minor_version   Second number in the project version
Project_build_number   Third number in the project version
Quicktime_version   String containing the full quicktime version number (e.g. 1.1.1)
Quicktime_major_version   First number in the quicktime version
Quicktime_minor_versino   Second number in the quicktime version
Quicktime_build_number   Third number in the quicktime version
Quicktime_available   Returns true if quicktime is loaded. Returns false if quicktime is not installed or if quicktime has been disabled in the project file.
Mailer_available   Returns true if the mailer is loaded. Returns false if the mailer is not installed or if the mailer has been disabled in the project file.
Printer_available   Always returns true.
Platform  

Returns an identifier for the platform:

Windows   Any version of windows
MacOS   Any version of Macintosh

See Also

system functions

Example

script check_system_specs is
  if gestalt (Color_depth) < 16 then
    load_item_in_frame ('color_depth_warning', 'main_window_frame')
  end
end