Statements and Loops

Edit

Introduction #

Conditional statements are used to perform different actions based on different conditions.
If a condition is true, you can perform one action and if the condition is false, you can perform another action.

  • If - Commands to be executed if the specified condition is true.
  • Else - Commands to be executed if the specified condition is false.
  • And - All specified conditions need to be true.
  • Or - At least one of the specified conditions needs to be true.


Edit

Statement: If #

If statement is used to specify a block of commands to be executed if a condition is true.
Else statement is executed if a condition is false.
You can think of it as If something is true, then do something, otherwise do something else.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.


Edit

Statement: And #

Statement: And is used in junction with a Statement: If.
It allows you to compare multiple conditions where ALL of them need to be true. If one of them is false, the whole If statement will be also false.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.


Edit

Statement: Or #

Statement: Or is used in junction with a Statement: If. It allows you to compare multiple conditions where at least one of them needs to be true.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.


Edit

Statement: Re-enable if #

Commands inside the statement will be repeated for x number of times with x milliseconds of delay between each repeat IF the condition is true. Else they will be executed only once.
Statement: Re-enable if can contain AND and Or statements as well.
You can create some really cool effects with this command.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.
Reactivate (ms) Int Delay between each re-enable. If set to 0, it will repeat indefinitely.
Amount Int How many times you want to re-enable the commands. Set to -1 for unlimited amount.


Edit

Repeat #

Instantly repeats all the commands inside the block for a specified number of times.
This is useful for instantly retrieving multiple values from File: Load Value/String or from Stack: Pull command.

Box Name Type Description
Repeat amount Int (number) How many times you wish to repeat commands inside the block.


Edit

Statement: Exit if #

If the condition is true, it terminates all the commands and prevents them from happening until the button is pressed again.
Will not cancel button macros or sounds attached to the button.
You can use this command in junction with Statement: And and Statement: Or commands.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.


Edit

Statement: Break if #

If the condition is true, this command will break out of a repeat or re-enable statement, cancelling every command inside of the block if it hasn’t been executed yet.
Re-enable statement will be disabled as well.
You can use this command in junction with Statement: And and Statement: Or commands.

Box Name Type Description
Var./real/”string” Variable, real or string Left side of the comparison you want to evaluate.
Compare Type Dropdown menu Operator you wish to use to compare left and right side.
Var./real/”string” Variable, real or string Whatever you want to compare the left side with.