| Purpose | With if you can make script commands dependent on conditions. For example, on the current GUI-Status or on whether certain fields exist in the SAP screen. |
|
Examples
Further examples |
GuiXT
If the GUI Status is ADD1 or UPD1, the image file "imgupd.gif" will appear, otherwise "imgdis.gif" will appear. |
| Conditions | What conditions
are available with
if
? Firstly, you can look for the existence of screen elements by simply naming the corresponding screen element in the if command. For example:
Thirdly you can inquire about user options set in guixt.ini: Option
opt1
with if Q[Option=xxxx]. You can define up to 50 different options in guixt.ini, each Option string containing up to 30 characters. |
|
Is it
possible to use nested if else endif?
Are logical expressions permitted? |
Yes, both
are possible. Example:
GuiXT
You can use normal brackets,
"and",
"or"
and "not"
within logical expressions. Normal rules of logic apply for priority and
bracketing.
|
| Option -strict in variable comparison | When you
compare a variable with a value
if V[vname=value] the following rules are automatically applied:
Please use the option -strict in order to compare the values without
applying these rules:
When there are multiple comparisons linked by "and" or "or," always refers to the comparison immediately preceding it. Example:
GuiXT
|
|
Tips
|
|
| Components | GuiXT |