The SysInfo object is created by the DOpusFactory.SysInfo method. It lets scripts access miscellaneous system information that may not be otherwise easy to obtain from a script.

Method Name Arguments Return Type Description

DarkMode

none

bool

Returns true if Dark Mode is on within Opus, and false otherwise.

May differ from DarkModeApps if Opus is configured to override the system-wide setting, or on older versions of Windows which did not have Dark Mode.

DarkModeApps

none

bool

Returns true if Windows is configured to run applications in Dark Mode, and false otherwise.

Always returns false on older versions of Windows which did not have a Dark Mode.

DPI

none

int

Returns the DPI that Opus is currently running in (e.g. 96 DPI is 100% scaling).

FindProcess

string

int

Allows you to test if a named process is currently running, and returns the process's ID if so. If the process isn't running 0 is returned. You can use wildcards or (by prefixing the pattern with regex:) regular expressions.

Language

none

string

Returns a string indicating the language Opus is currently using.

Monitors

none
or
int:index

Vector:Rect 
or
Rect 

If called with no arguments, returns a Vector of Rect objects which provide information about the positions and sizes of the display monitors in the system.

If called with an index argument, returns a single Rect with the information for just a particular monitor.

The WorkAreas method, documented below, is sometimes what you should use instead of this.

MouseMonitor

none

int

Returns the index of the monitor the mouse pointer is currently positioned on.

MousePosX

none

int

Returns the current x-coordinate of the mouse pointer.

MousePosY

none

int

Returns the current y-coordinate of the mouse pointer.

ShadowBorder

none

Rect

Returns a Rect giving the size of the invisible border around windows.

On some operating systems (e.g. Windows 10), windows may be larger than they appear: Beyond the visible edge is a border that is part of the window but invisible. This border exists for legacy compatibility, allowing window frames to appear thin while providing something thick enough to resize with the mouse.

You can usually ignore the border but it is important when positioning windows next to each other, or to screen edges, where ignoring it results in gaps between windows.

The Rect returned by this method is unusual: The left, right, top and bottom properties do not represent the coordinates of a rectangle but rather the width of borders (if any) on each side of a window. As a consequence, the width and height properties of the Rect are meaningless.

On Windows 10, the top border is typically zero and the others are usually several pixels thick. The thickness varies by OS version, system DPI, and other factors; you should not store it to disk as it may not be correct for the system that loads it.

This property is relatively expensive to calculate. You should not, for example, call the method once for each side; instead, call it once and store the Rect in a variable, then query that for each side.

SystemDPI

none

int

Returns the DPI that the system is currently running in (e.g. 96 DPI is 100% scaling). This will normally be the same as the DPI value, but if the system DPI has been changed and Opus has not been restarted they can be different.

TouchInput

none

bool

Returns True if the system is currently using touch input.

USBInstall

none

bool

Returns True if Opus is running from a USB export.

WorkAreas

none
or
int:index

Vector:Rect 
or
Rect 

Similar to the Monitors method, documented above, except it returns the work area of each monitor rather than the full monitor area.

A monitor's work area is the monitor's rectangle minus the Windows Taskbar and any other app bars (which can include docked toolbars created by Opus, or similar things added by other software). If a monitor does not have a Taskbar or other app bar docked to it, its work area will be the same as its full rectangle.