System
From Real Software Documentation
The properties of the System module are used to get information about the user’s computer.
| Properties | |||||||||||||||
|
| Methods | ||||||||||||
|
Class Constants
PenType
The following class constants can be used with the PenType method to determine the type of pen in use with an attached graphics tablet.
| Class Constant | Description |
|---|---|
| PenTypeNone | No pen. |
| PenTypeTip | The tip end of the pen is in use. |
| PenTypeEraser | The eraser end of the pen is in use. |
Notes
MouseX and MouseY return coordinates with respect to the top-left corner of the user's monitor. The Window and Control classes contain MouseX and MouseY properties that are referenced to the window (in the case of the Control class, the control's parent window).
The SerialPort and SerialPortCount properties work normally in carbonized applications running in Mac OS X.
Multiple Interface Support
Multiple network interface support enables you to write applications that can bind to different NIC cards installed on a user's machine. For example, you can use this to write tunneling applications. To see what interfaces are installed on the user's machine, you can use the GetNetworkInterface method and assign the obtained interface object to a NetworkInterface property of the SocketCore class.
Examples
The following displays the number of serial ports on the user's machine and their names. On a 'normal' Macintosh, serialport zero is the Modem port and serialport 1 is the Printer port:
TextFiedl2.text=System.serialport(0).Name
TextField3.text=System.serialport(1).Name
The following returns the version of QuickTime installed on the user’s computer:
Dim b as Boolean
Dim i,resp as Integer
#If TargetMacOS
b=System.gestalt("qtim",resp)
If b then
s=Hex(resp)
For i =Len(s) DownTo 1
s=Left(s,i)+"."+Mid(s,i+1)
Next
MsgBox "QuickTime version "+s
End if
#Endif
The result is shown below.
This example checks whether the application is running on Mac OS X 10.5 or higher.
Dim SysVersion as Integer
If System.Gestalt("sysv", sysVersion) and sysVersion >=&h 1050 then
//do something here
End if
The following gets the system environment variables for any supported platform.
MsgBox sh.Result
This example gets the value of the COMPUTERNAME environment variable on Windows.
See Also
Application, MouseCursor, SerialPort classes; App, Cursors, NetworkInterface objects.

