继续

从头开始继续执行重复结构。

命令可用性: 本地 IBM RPA SaaS 和 IBM RPA

脚本语法

IBM RPA 的专有脚本语言的语法与其他编程语言类似。 该脚本语法在脚本文件中定义命令的语法。 您可以在 IBM RPA Studio的 脚本 方式下使用此语法。

continue

依赖关系

必须在重复结构块中使用此命令。 以下命令启动重复结构:

示例

以下示例启动运行 5 次的重复结构。 如果 counter 变量中的数字小于或等于 3 ,那么将使变量 nextLoop递增。 否则,将调用 继续 命令以防止 nextLoop 变量的增量。

defVar --name counter --type Numeric
defVar --name nextLoop --type Numeric --value 1
for --variable ${counter} --from 1 --to 5 --step 1
    logMessage --message "Loop Number: ${counter}" --type "Info"
    if --left "${counter}" --operator "Greater_Than" --right 3
        continue
    endIf
    incrementVar --number ${nextLoop}
next
logMessage --message "Next Loop value: ${nextLoop}" --type "Info"