Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
SystemInfo.WinSystemMetrics
Retrieves the specified system metric or system configuration setting.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SystemInfo | 6.3 | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
ID | The ID of the value to query. Can be the name of the value without SM_ prefix like "CMONITORS" or the numeric value like 80. |
"CMONITORS" |
Result
Returns value or error.
Description
Retrieves the specified system metric or system configuration setting.Note that all dimensions retrieved by GetSystemMetrics are in pixels.
Please see Microsoft website for all the possible parameters and return values:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx
Values for Digitizer query:
Name | Value | Meaning |
NID_INTEGRATED_TOUCH | 1 | The device has an integrated touch digitizer. |
NID_EXTERNAL_TOUCH | 2 | The device has an external touch digitizer. |
NID_INTEGRATED_PEN | 4 | The device has an integrated pen digitizer. |
NID_EXTERNAL_PEN | 8 | The device has an external pen digitizer. |
NID_MULTI_INPUT | 64 | The device supports multiple sources of digitizer input. |
NID_READY | 128 | The device is ready to receive digitizer input. |
Examples
Query number of display monitors on a desktop.
MBS( "SystemInfo.WinSystemMetrics"; "CMONITORS")
Example result: 1
Query size of screen:
MBS( "SystemInfo.WinSystemMetrics"; "CXScreen")
& " x " &
MBS( "SystemInfo.WinSystemMetrics"; "CYScreen")
Example result: 1280 x 768
Query whether we are shutton down:
# Returns 1 if FileMaker Window Close Script Trigger was called due to shutdown
MBS( "SystemInfo.WinSystemMetrics"; "SHUTTINGDOWN")
Example result: 0
Query whether system is a Tablet PC:
MBS( "SystemInfo.WinSystemMetrics"; "TabletPC")
Example result: 1
Query whether we are in slate mode:
# Returns 0 for slate mode, else non-zero
MBS( "SystemInfo.WinSystemMetrics"; "ConvertibleSlateMode")
Example result: 0
Query whether mouse is installed:
MBS( "SystemInfo.WinSystemMetrics"; "MousePresent")
Example result: 1
Query whether a mouse wheel is present:
MBS( "SystemInfo.WinSystemMetrics"; "MouseWheelPresent")
Example result: 1
Query whether we have a digitizer
# Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; otherwise, 0.
# The return value is a bitmask that specifies the type of digitizer input supported by the device.
# e.g. 193 for a ready touch device with multi touch.
MBS( "SystemInfo.WinSystemMetrics"; "Digitizer")
Example result: 193
Query whether we have a remote session:
MBS( "SystemInfo.WinSystemMetrics"; 4096 )
Blog Entries
This function is free to use.
Created 15th June 2016, last changed 9th November 2018