Keyword: COND - If Statement

Keywords are used within scripts that enabled powerful features such as dynamic variables, clipboard manipulation, read/write files, mimic inputs and more.
User avatar
YiMeng
Author
Posts: 235
Joined: Sat Jul 18, 2020 10:58 pm
Location: NY
Contact:

Keyword: COND - If Statement

Unread post by YiMeng »

Description
  • Performs a condition operation and returns true or false.
  • Valid operators: "==", "!=", "<=", ">=", "<", ">", "contains".
  • Invalid operator will return false.
  • Nested COND Keyword have parsing limitations and should NOT use REPEAT in TRUE clause if there is a set FALSE clause.
    • Use CONTINUE/FQUIT Keywords when there is FALSE clause for nested CONDs.
      • LOOP REPEATS 1 COND 6 == %X% ? CONTINUE && REPEATS 1 DISPMSG FALSE | SETVARI X
        REPEATS 1 DISPMSG TRUE! | FQUIT

Parameters
  • x: The value of variable 1
  • y: The value of variable 2
  • Allow the use of "+" for AND operator
  • Allow the use of "," for OR operator
  • z: The line command if the condition is true
  • w (optional): The line command if the condition is false

Usage
  • COND %x% == %y% ? z && w
  • COND %x% == %y% + %y% == %x% ? z
  • COND heystack contains needle ? z && w