<text> Formats text saved in a variable.

Command Tree: | Text Format
. |
Syntax: | <text>("Variable", "Operation", "Operand1", "Operand2")
Variable | Variable that contains the text to be formatted. The formatted text is saved back in the variable.
Operation | Operation can be one from the following: "APPEND" - appends a text specified by Operand1 to the end of the text in the Variable. "LEFT" - extracts first Operand1 characters from the Variable text. "RIGHT" - extracts last Operand1 characters from the Variable text. "UPPERCASE" - changes the Variable text to uppercase. "LOWERCASE" - changes the Variable text to lowercase. "JUSTIFY" - multiline text operation. Formats Variable text so that all the lines have the same length (defined by Operand1). "INDENT_LEFT" - multiline text operation. Removes one space character from begin of each line. "INDENT_RIGHT" - multiline text operation. Adds one space character to begin of each line. "LIST" - multiline text operation. Creates numbered list from the paragraphs delimited by an empty line. "CENTER" - multiline text operation. Formats Variable text so that all the lines are centered and have the same length (defined by Operand1). "UNDERLINE" - To the Variable text, adds new line consisting from a character defined by Operand1. "INTERSPACES" - Inserts spaces after each character ("text" becomes "t e x t"). "ALIGN_LEFT" - multiline text operation. Formats Variable text so that all the spaces on the begin of each line are removed (defined by Operand1). "ALIGN_RIGHT" - multiline text operation. Formats Variable text so that all the lines have the same length (defined by Operand1) and all the lines are right aligned. "REPLACE" - replaces substring defined by Operand1 by Operand2 string. "FIND" - finds substring defined by Operand1 and saves its index (zero based) to the Variable. "INSERT" - inserts string defined by Operand1 to the position defined by Operand2. "DELETE" - deletes Operand2 characters starting from Operand1 position. "GET_CHAR" - the character from the Operand1 position is saved in Operand2 variable. "TOGGLE_CASE" - uppercase characters are changed to lowercase and vice versa. "SENTENCE_CASE" - the first character in the sentence is changed to uppercase. "FIRST_UPPER" - the first character of each word is changed to uppercase.
Operand1 | depends on the Operation and has this meaning: "APPEND" - text to append. "LEFT" - number of characters to extract. "RIGHT" - number of characters to extract. "UPPERCASE" - not used. "LOWERCASE" - not used. "JUSTIFY" - the length of text rows. If zero, the length of the first row is taken. "INDENT_LEFT" - not used. "INDENT_RIGHT" - not used. "LIST" - the length of text rows. If zero, the length of the first row is taken. "CENTER" - the length of text rows. If zero, the length of the first row is taken. "UNDERLINE" - the character to be used to 'underline' the text. "INTERSPACES" - not used. "ALIGN_LEFT" - not used "ALIGN_RIGHT" - the length of text rows. If zero, the length of the first row is taken. "REPLACE" - the string to be replaced. "FIND" - the string to find . "INSERT" - the position where to insert string. "DELETE" - the position where to delete characters. "GET_CHAR" - the position of the character to get "TOGGLE_CASE" - not used. "SENTENCE_CASE" - not used. "FIRST_UPPER" - not used.
Operand2 | depends on the Operation and has this meaning: "APPEND" - not used. "LEFT" - not used. "RIGHT" - not used. "UPPERCASE" - not used. "LOWERCASE" - not used. "JUSTIFY" - not used. "INDENT_LEFT" - not used. "INDENT_RIGHT" - not used. "LIST" - the format of the list. Can be one of these string: "1)" "1." "1/" "A)" "A." "A/" "a)" "a." "a/" "-" "#" "*" "CENTER" - not used. "UNDERLINE" - not used. "INTERSPACES" - not used. "ALIGN_LEFT" - not used "ALIGN_RIGHT" - not used. "REPLACE" - the replacing string. "FIND" - not used. "INSERT" - the string to insert. "DELETE" - the number of characters to delete. "GET_CHAR" - the variable receiving the character. "TOGGLE_CASE" - not used. "SENTENCE_CASE" - not used. "FIRST_UPPER" - not used.
. |
. |
Example: | <#> This macro shows how to use text formatting command <#> <commands_only_on> <msg>(100,100,"Copy a text to format to the clipboard and press OK.","Message",1) <if_clp>("SET","") <varchng>("vText","GC","") <varset>("vOperation=Justify|Center|Indent Right|List","Select operation") <if>("vOperation==Justify") <text>("vText","JUSTIFY","0","") <endif> <if>("vOperation==Center") <text>("vText","CENTER","0","") <endif> <if>("vOperation==Indent Right") <text>("vText","INDENT_RIGHT","0","") <endif> <if>("vOperation==List") <text>("vText","LIST","0","1.") <endif> <clpput>("vText") <msg>(100,100,"The formatted text is in the clipboard.","Message",1) <else> <msg>(100,100,"Clipboard is empty.","Message",1) <endif>