等待窗口关闭
动词:waitWindowClose
根据定义的超时,等待窗口关闭。
语法
waitWindowClose --window(Window) [--timeout(TimeSpan)] (Boolean)=value
输入
| 脚本 | 设计器 | 必需的 | AcceptedTypes | 描述 |
|---|---|---|---|---|
| --window | 窗口 | 必需的 | 窗口 | 等待关闭的窗口。 |
| --timeout | Timeout | 可选 | 时间范围、数字、文本 | 执行命令的最长等待时间。 |
输出
| 脚本 | 设计器 | AcceptedTypes | 描述 |
|---|---|---|---|
| 值 | 成功 | BOOLEAN | 如果窗口已关闭,那么返回“True”;否则,返回“False”。 |
示例
启动记事本,等待 5 秒,并检查窗口是否已关闭,然后在 IBM RPA Studio 输出控制台中显示结果。
defVar --name notepadWindow --type Window
defVar --name result --type Boolean
launchWindow --executablepath "notepad.exe" notepadWindow=value
waitWindowClose --window ${notepadWindow} result=value
// The result displays in the console changes according to the window interaction, if it is closed by the user, the result is "True", otherwise it is "False"
logMessage --message "Closed window: ${result}" --type "Info""