WiseScript Editor Reference
77
Speciallog.log). If just a file name is entered, the log is written to the same directory
as the first installed file.
See also:
Add Text to INSTALL.LOG
on page 35
Parse String
This action splits a text string and places the results in two variables.
You can split the string at a character or substring that you specify, which discards the
character or substring you specified. Example: If you split the string “ONE,TWO” at the
first occurrence of a comma, “ONE” is put into destination variable 1 and “TWO” is put
into the destination variable 2. If the character or substring is not found, the entire
string is put into destination variable 1, and nothing is put into destination variable 2.
The find is case-sensitive.
You can also split a string at any arbitrary character position, which discards no
characters. Example: If you split the string “ONE,TWO” at character position four from
left, then “ONE,” is put into the destination variable 1 and “TWO” is put into the
destination variable 2.
To complete the dialog box
z
Source Value
Enter the text to be parsed. You enter text and variables (examples: %MAINDIR%
or %MAINDIR%\%PICTDIR%). To include a literal percent (%) symbol, use %%.
z
Pattern/Position
Enter the character pattern or the character position at which to split. Character
patterns are case-sensitive unless you mark Ignore Case. To split at a pattern,
enter any number of characters, including numbers, and select one of the pattern
options in Operation. To split a string based on character position, enter the
character position, where 1 is the first character, and select one of the position
options in Operation.
z
Destination Variable 1,2
Select or enter variables to store the two strings resulting from this operation.
Operation, below, determines how each variable is populated.
z
Operation
Select how to split the text string.
z
Trim Spaces
Mark this to remove leading and trailing spaces from both destination variables.
z
Ignore Case
Mark to make pattern matching case-insensitive.
The sample scripts TextFile.wse and URL.wse use this action. For details on sample
scripts, see ScriptHelp.htm in the Samples subdirectory of this product’s installation
directory.
Содержание ALTIRIS INVENTORY 7.0 SP2 - FOR NETWORK DEVICES V1.0
Страница 1: ...WiseScript Editor Reference ...
Страница 31: ...WiseScript Editor Reference 31 ...
Страница 91: ...WiseScript Editor Reference 91 ...
Страница 148: ...WiseScript Editor Reference 148 ...