End If
终止由 If (if) 命令启动的命令块。
命令可用性: 本地 IBM RPA SaaS 和 IBM RPA
依赖关系
使用 If (if) 命令启动命令块。
脚本语法
IBM RPA 的专有脚本语言的语法与其他编程语言类似。 该脚本语法在脚本文件中定义命令的语法。 您可以在 IBM RPA Studio的 脚本 方式下使用此语法。
endIf
示例
以下示例显示如何使用 If (if) 命令块启动命令块。
defVar --name studentAverage --type Numeric --value 8 --parameter
// Check the value of "studentAverage" and inform that you can participate in the draw, because this value is greater than 7.
if --left "${studentAverage}" --operator "Greater_Than" --right 7
messageBox --title Grade --text "Congratulations! You can participate in the draw!" --icon "Information" --buttons "OK" --defaultbutton "FirstButton"
endIf
// At the end, the command block is closed.
logMessage --message "${studentAverage}" --type "Info"
// Display the value of "studentAverage" in the console.