-
Notifications
You must be signed in to change notification settings - Fork 8
getText
MicroBlaster edited this page Nov 10, 2019
·
2 revisions
Purpose: Copies a value out of a line of text by using sub strings.
Syntax: getText {line} var {startValue} {endValue}
{line}: The line of text to copy a value from.
var: A variable to store the value in.
{startValue}: A value within the line of text of which the ending point marks the beginning of the copied value.
{endValue}: A value within the line of text of which the beginning point marks the end of the copied value.
Notes: This command is a quick and easy way to snatch a value out of the CURRENTLINE after a TextLineTrigger has triggered. If you know of two blocks of text within the line, you can copy out the area of text between them using this command.
Example:
setVar $line "This is a test line to copy text from"
getText $line $value "line to " " text from"
# displays: "copy"
echo $value
.