> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/sysinfo.zh.md).

# SysInfo

**SysInfo** 对象由 [**DOpusFactory**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/dopusfactory.zh.md)**.SysInfo** 方法创建。它允许脚本访问各种系统信息，这些信息可能无法通过其它方式从脚本中轻松获取。

| 方法名称         | 参数                                           | 返回值类型                                                                                                                                                                                                                                                                                                                                                                                            | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DarkMode     | *无*                                          | *bool*                                                                                                                                                                                                                                                                                                                                                                                           | <p>如果 Opus 中启用了深色模式，则返回 true，否则返回 false。</p><p>如果 Opus 配置为覆盖系统范围的设置，或者在没有深色模式的旧版 Windows 上，则可能与 <strong>DarkModeApps</strong> 不同。</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| DarkModeApps | *无*                                          | *bool*                                                                                                                                                                                                                                                                                                                                                                                           | <p>如果 Windows 配置为在深色模式下运行应用程序，则返回 true，否则返回 false。</p><p>在没有深色模式的旧版 Windows 上始终返回 false。</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| DPI          | *无*                                          | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 返回 Opus 当前运行的 DPI（例如 96 DPI 为 100% 缩放）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| FindProcess  | *string*                                     | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 允许您测试命名进程是否正在运行，如果正在运行，则返回进程的 ID。如果进程未运行，则返回 **0**。您可以使用通配符或（通过在模式前加上 **regex:**）正则表达式。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Language     | *无*                                          | *string*                                                                                                                                                                                                                                                                                                                                                                                         | 返回一个字符串，指示 Opus 当前使用的语言。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Monitors     | <p><em>无</em><br>或<br><em>int:index</em></p> | <p><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/vector.zh.md"><strong>Vector</strong></a><strong>:</strong><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a> <br>或<br><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a></p> | <p>如果调用时没有参数，则返回一个包含 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a> 对象的 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/vector.zh.md"><strong>Vector</strong></a>，这些对象提供有关系统中显示器位置和大小的信息。</p><p>如果调用时带有索引参数，则返回一个单独的 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a>，其中包含特定显示器的信息。</p><p>下面介绍的 <strong>WorkAreas</strong> 方法有时是您应该使用的方法，而不是此方法。</p>                                                                                                                                                                                                                                         |
| MouseMonitor | *无*                                          | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 返回鼠标指针当前所在显示器的索引。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| MousePosX    | *无*                                          | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 返回鼠标指针的当前 x 坐标。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| MousePosY    | *无*                                          | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 返回鼠标指针的当前 y 坐标。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ShadowBorder | *无*                                          | [**Rect**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md)                                                                                                                                                                                                                                                                                                      | <p>返回一个 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a>，给出窗口周围不可见边框的大小。</p><p>在某些操作系统（例如 Windows 10）上，窗口可能比它们看起来更大：在可见边缘之外是窗口的一部分，但不可见。此边框存在是为了向后兼容，允许窗口框架看起来很薄，同时提供足够厚的东西以便用鼠标调整大小。</p><p>您通常可以忽略边框，但在将窗口并排放置或放置到屏幕边缘时，它很重要，忽略它会导致窗口之间出现间隙。</p><p>此方法返回的 <strong>Rect</strong> 很不寻常：<strong>left</strong>、<strong>right</strong>、<strong>top</strong> 和 <strong>bottom</strong> 属性不代表矩形的坐标，而是表示窗口每侧边框的宽度（如果有）。因此，<strong>Rect</strong> 的 <strong>width</strong> 和 <strong>height</strong> 属性毫无意义。</p><p>在 Windows 10 上，顶部边框通常为零，其它边框通常有几个像素宽。厚度因操作系统版本、系统 DPI 和其它因素而异；您不应该将其存储到磁盘，因为它可能不适用于加载它的系统。</p><p>此属性计算起来相对昂贵。例如，您不应该为每侧调用一次方法；而是调用一次并将 <strong>Rect</strong> 存储在一个变量中，然后为每侧查询该变量。</p> |
| SystemDPI    | *无*                                          | *int*                                                                                                                                                                                                                                                                                                                                                                                            | 返回系统当前运行的 DPI（例如 96 DPI 为 100% 缩放）。这通常与 **DPI** 值相同，但如果系统 DPI 发生了更改而 Opus 未重新启动，它们可能不同。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| TouchInput   | *无*                                          | *bool*                                                                                                                                                                                                                                                                                                                                                                                           | 如果系统当前使用触摸输入，则返回 **True**。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| USBInstall   | *无*                                          | *bool*                                                                                                                                                                                                                                                                                                                                                                                           | 如果 Opus 从 [USB 导出](/directory-opus/guan-fang-shou-ce/readme.zh-4/exporting_to_usb.zh.md) 中运行，则返回 **True**。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| WorkAreas    | <p><em>无</em><br>或<br><em>int:index</em></p> | <p><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/vector.zh.md"><strong>Vector</strong></a><strong>:</strong><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a> <br>或<br><a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md"><strong>Rect</strong></a></p> | <p>与上面介绍的 <strong>Monitors</strong> 方法类似，但它返回每个显示器的 <em>工作区</em> 而不是整个显示器区域。</p><p>显示器的 <em>工作区</em> 是显示器的矩形减去 Windows 任务栏和任何其它 <em>应用程序栏</em>（可以包括 Opus 创建的对接工具栏，或者其它软件添加的类似内容）。如果显示器没有对接在其上的任务栏或其它应用程序栏，则其工作区将与其完整矩形相同。</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/sysinfo.zh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
