If Statement; Include Script - Symantec WISESCRIPT EDITOR 7.0 SP2 - FOR NS V1.0 Manual

Hide thumbs Also See for WISESCRIPT EDITOR 7.0 SP2 - FOR NS V1.0:
Table of Contents

Advertisement

If Statement

Include Script

WiseScript Editor Reference
You do this by adding a Compiler Variable If/Else/End block. You get the file version of a
key runtime file using the file version option of a Compiler If statement. Then, if the file
version is not the one the script requires, use the Halt Compilation action to prevent
compilation.
This action marks the beginning of a conditional block of script, an If block. If the
condition specified in the If Statement is true, the lines inside the If block are executed.
The If block can also contain an Else or several ElseIf actions.
To create an If block
1.
Add an If Statement and complete the dialog box:
If Variable
Select a variable from the first drop-down list, and a comparison method from
the second drop-down list.
Expression True means the expression in the Value field below is evaluated
according to the rules outlined in
variable is ignored and can be left blank. The result is considered true if it
evaluates to a non-zero result.
(The password comparisons are not applicable in this product.)
The Value
Enter the value to be used in the comparison, or an expression if the
comparison is set to Expression True. If you enter variable names, do not
surround them with percent signs (%). If you enter compiler variables, then you
must surround them with percent signs.
2.
Below the If Statement, add one or more actions to perform if the variable has the
specified value.
3.
(Optional) Add an Else or several ElseIf actions. Follow the Else action with one or
more actions to perform if the compiler variable does not have the specified value.
4.
Add an End Statement.
Sample scripts that use this action are Search.wse, WiseUp.wse, and scripts that
manipulate strings and perform calculations. For details on sample scripts, see
ScriptHelp.htm in the Samples subdirectory of this product's installation directory.
See also:
Else Statement
on page 60
ElseIf Statement
on page 60
End Statement
on page 61
This action adds an additional script to the current installation script. During compile,
the include script is copied into the calling script at the location of the Include Script
action, resulting in a combination of the scripts.
Include scripts can save time because you can develop a library of WiseScripts that
perform specific functions, like subroutines. You can re-use include scripts and share
Variables and Expressions
on page 28. The
72

Advertisement

Table of Contents
loading

Table of Contents