> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alterhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取活动应用程序上下文

> 捕获活动窗口内容和 OCR 文本以供计算机使用工作流程

在采取行动之前，使用此工具读取应用程序或浏览器窗口中当前可见的内容。

## 它的作用

* 默认情况下从活动应用程序窗口检索内容。
* 接受可选的`windowID` (`pid/title`) 以定位特定窗口。
* 返回提取的文本内容。
* 在有用时添加屏幕截图中的 OCR 文本。

## 常见用途

* 单击之前阅读页面或应用程序状态。
* 提取可见内容作为摘要。
* 在多步骤自动化之前建立稳定的环境。

＃＃ 输入

* `windowID`（可选）：从`list_windows` 定位特定窗口。

## 良好的配对

* [执行](/apps-tools/computer-use-perform)
* [滚动](/apps-tools/computer-use-scroll)
* [等等](/apps-tools/computer-use-wait)
