# SysInfo

The **SysInfo** object is created by the [**DOpusFactory**](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_                                                                                                                                                           | <p>Returns true if Dark Mode is on within Opus, and false otherwise.</p><p>May differ from <strong>DarkModeApps</strong> if Opus is configured to override the system-wide setting, or on older versions of Windows which did not have Dark Mode.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| DarkModeApps | _none_                                           | _bool_                                                                                                                                                           | <p>Returns true if Windows is configured to run applications in Dark Mode, and false otherwise.</p><p>Always returns false on older versions of Windows which did not have a Dark Mode.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 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     | <p><em>none</em><br>or<br><em>int:index</em></p> | <p><a href="vector"><strong>Vector</strong></a><strong>:</strong><a href="rect"><strong>Rect</strong></a> <br>or<br><a href="rect"><strong>Rect</strong></a></p> | <p>If called with no arguments, returns a **<a href="vector">Vector</a>**of <a href="rect"><strong>Rect</strong></a> objects which provide information about the positions and sizes of the display monitors in the system.</p><p>If called with an index argument, returns a single <a href="rect"><strong>Rect</strong></a> with the information for just a particular monitor.</p><p>The <strong>WorkAreas</strong> method, documented below, is sometimes what you should use instead of this.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 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**](rect)                                                                                                                                                 | <p>Returns a <a href="rect"><strong>Rect</strong></a> giving the size of the invisible border around windows.</p><p>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.</p><p>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.</p><p>The <strong>Rect</strong> returned by this method is unusual: The <strong>left</strong>, <strong>right</strong>, <strong>top</strong> and <strong>bottom</strong> 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 <strong>width</strong> and <strong>height</strong> properties of the <strong>Rect</strong> are meaningless.</p><p>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.</p><p>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 <strong>Rect</strong> in a variable, then query that for each side.</p> |
| 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](../../../additional_functionality/exporting_to_usb).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| WorkAreas    | <p><em>none</em><br>or<br><em>int:index</em></p> | <p><a href="vector"><strong>Vector</strong></a><strong>:</strong><a href="rect"><strong>Rect</strong></a> <br>or<br><a href="rect"><strong>Rect</strong></a></p> | <p>Similar to the <strong>Monitors</strong> method, documented above, except it returns the <em>work area</em> of each monitor rather than the full monitor area.</p><p>A monitor's <em>work area</em> is the monitor's rectangle minus the Windows Taskbar and any other <em>app bars</em> (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.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
