![]() |
Dial_GetScreenInfo |
The function returns (position) information of all the screens (displays) that are currently attached to this computer.
Syntax
Dial_GetScreenInfo ( switches { ; screenNumber } )
Parameters
switches | modifies the returned result of the function |
screenNumber | (optional) only return information of the screen with this screen number |
Switches
Switches can be empty or you can add one of these switches:
-ReturnScreenInfo | (default) return a list of information of (all) screens attached to this computer |
-CountOfScreens | only return the number of screens attached to this computer |
Returned Result
Data type returned
Text
Result
If successful it returns either the number of screens attached to this computer. Or it returns a list of information of (all) screens attached to this computer, including screen name, screen ID and global coordinates of the screen bounds.
The returned info can contain these items:
Screen number: this is an index 1…n. Screen 1 is the main screen with the menu bar. Screen numbers will change if you remove a display or rearrange the displays.
Screen ID: this ID is assigned by macOS, but can change when you restart or plug the display in a different port.
Serial number: this is the serial number of the display and will not change. But not all screens will have a serial number. In this case the value returned will be zero.
Screen rectangle: the global bounds of the screen, formatted as: “left, top, width, height”
Originated in
Troi Dialog Plug-in 12.0
Compatibility
FileMaker Pro 17 to FileMaker Pro 21 (2024)
Considerations
Currently implemented on macOS only.
Note that the screen information (and screen number) may change while FileMaker is running, for example when a new display is attached or the displays are rearranged in the System Settings.
The screen rectangle can have negative coordinates, if the screen is positioned to left or above the main screen.
Example
Dial_GetScreenInfo ( "-CountOfScreens" )
This will return the number of screens attached to this computer, for example 3.
Example 2
Dial_GetScreenInfo ( "-ReturnScreenInfo" )
This will return a list of information, if you have 2 screens attached to this computer the result will be similar to this:
Screen number: 1
Screen name: Studio Display
Screen ID: 42933119
Screen serial number: 409676040
Screen rectangle: 0, 0, 2560, 1440
Rotation angle: 0
Screen number: 2
Screen name: Built-in Retina Display
Screen ID: 64342405
Screen serial number: 0
Screen rectangle: -1680, 48, 1680, 1050
Rotation angle: 0
Used in example file
Position.fmp12
Related functions
Dial_GetGlobalScreenPosition |
Dial_SetPosition |
Related topics
Troi Dialog Plug-in online help (overview)