> ## 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.

# Else If 窗口包含

## 指令说明

**描述：** 检测指定的元素是否包含在指定窗口中，通常需要与【If 窗口包含】结合使用。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/54VOmvcVz9x5vq70/helpcenter/commands/condition/images/else-if-win-01-panel.png?fit=max&auto=format&n=54VOmvcVz9x5vq70&q=85&s=aa6c34bcbb94fcbcd54b7b6a996cbc16" alt="Else If 窗口包含指令参数面板" width="660" height="382" data-path="helpcenter/commands/condition/images/else-if-win-01-panel.png" />

    | 参数           | 说明                                       |
    | ------------ | ---------------------------------------- |
    | **窗口对象**     | 根据目标元素自动匹配窗口或选择一个之前通过【获取窗口对象】指令创建的窗口对象   |
    | **检测指定窗口是否** | 包含 / 不包含元素                               |
    | **选择元素**     | 从元素库中选择一个已捕获的元素或通过「捕获新元素」来捕获新的窗口元素作为操作目标 |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/54VOmvcVz9x5vq70/helpcenter/commands/condition/images/else-if-win-02-flow.png?fit=max&auto=format&n=54VOmvcVz9x5vq70&q=85&s=e13427c7990eaa07d2076b356dce9287" alt="Else If 窗口包含 - 流程搭建" width="1241" height="189" data-path="helpcenter/commands/condition/images/else-if-win-02-flow.png" />

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

获取标题为微信的窗口对象

判断窗口对象中是否包含指定窗口元素

若桌面不包含则为 false，执行 Else If 窗口包含执行判断

执行 Else If 窗口包含如果为 true，则执行里面的指令【点击窗口元素】

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/54VOmvcVz9x5vq70/helpcenter/commands/condition/images/else-if-win-03.png?fit=max&auto=format&n=54VOmvcVz9x5vq70&q=85&s=3b74240713917a08cbbf65020771b411" alt="Else If 窗口包含 - 效果展示" width="1239" height="219" data-path="helpcenter/commands/condition/images/else-if-win-03.png" />

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