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

# 激活窗口

## 指令说明

**描述：** 激活指定窗口使其在前台运行。

<Info>
  被激活的窗口，请确保在任务栏中已被打开过。若未在任务栏中打开，可以先使用指令【启动任务程序】来打开指定的应用，再激活对应的窗口。
</Info>

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/desktop-automation/images/activewindowcommand-01.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=99970c0538727c19a9fa12b2a94fc60b" alt="激活窗口指令参数面板" width="649" height="320" data-path="helpcenter/commands/desktop-automation/images/activewindowcommand-01.png" />

    | 参数         | 说明                                                                 |
    | ---------- | ------------------------------------------------------------------ |
    | **获取窗口方式** | 选择获取窗口方式，窗口对象、窗口标题或类型名、捕获窗口元素                                      |
    | **窗口对象**   | 输入一个通过"获取窗口对象"获取的窗口对象                                              |
    | **窗口标题**   | 输入窗口标题，可添加窗口类型、是否正则匹配                                              |
    | **窗口类型**   | 输入窗口类型，窗口类型可借助工具FlaUInspect（自行从GitHub上拉取）获取，桌面软件的ClassName属性就是窗口类型 |
    | **选择元素**   | 选择要操作的目标元素                                                         |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/desktop-automation/images/activewindowcommand-02.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=8aa6ea970298cfb7dce883807aa09472" alt="激活窗口使用示例 - 流程搭建" width="494" height="126" data-path="helpcenter/commands/desktop-automation/images/activewindowcommand-02.png" />

**该流程执行逻辑：**

使用【激活窗口】激活标题包含WPS的窗口。

### 效果展示

成功将指定窗口激活到前台。

<img src="https://mintcdn.com/bazhuayu-rpa-docs/At1Bhn6G7IYQARg7/helpcenter/commands/desktop-automation/images/activewindowcommand-03.png?fit=max&auto=format&n=At1Bhn6G7IYQARg7&q=85&s=62e9781b13e0ffd1976d684b42a8b4f1" alt="激活窗口使用示例 - 效果展示" width="641" height="421" data-path="helpcenter/commands/desktop-automation/images/activewindowcommand-03.png" />

### 使用小Tips

* 被激活的窗口，请确保在任务栏中已被打开过
* 若未在任务栏中打开，可以先使用指令【启动任务程序】来打开指定的应用，再激活对应的窗口

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
