__header__
Description
The Parse Tool creates a formated string. This string can be accessed by other tools,
Using the Parse Tool
On the Parse Tool's parameters page the user defines the string that will be parsed in the
"String" menu. When the tool is run the string will be parsed and
fully displayed in the "Parsed Command" menu.
%1, %2, etc. can be defined within the tool itself, or can be linked to
a global parameter by dragging the Parameter object off the ROT.
When the parameter object is added to a menu in the parameters
page (%1, %2, etc.) a dropdown menu will appear over the textbox, and
the user can use the dropdown menu to select a parameter.
Example 1:
%Path = C:/Soft-Automation
%1 = Edit
String = %Path %1.
When the tool is run the values in the %Path and %1 menus will be parsed into the "Parsed Command"
ParsedCommand = C:/Soft-Automation Edit
Example 2: - formating -
%1 = 3.1459
String=%1{%02.0f}
output= 03
String=%1{%02.1f}
output= 03.1
String=%1{%.2f}
output= 3.15
ie the formating use 'c language' notation
see printf on wiki
or
see printf on microsoft
or
google "printf format specifiers"
Example 3: - Date (prevous step is a GCTime Step) -
%2 = Year
%3 = Month ...
%Path\%1\%2{%4.0f}%3{%02.0f}%4{%02.0f}_%5{%02.0f}%6{%02.0f}%7{%03.0f}.jpg
Example 4: - Insert carriage return or a line feed
%1{\n} NOTE the %1 can be anything but the "{" must follow right after it is thre % that triggers the loooking for a format string
%1{\r}
%1{\r\n}