Pad Text Action

Description

Adds a single character to the beginning and/or end of the specified text and places the result in a variable.

Declaration

<AMTEXTPAD ACTION="text [options]" TEXT="text" PADDINGCHAR="text" PADTYPE="text [options]" AMOUNT="text" RESULTVARIABLE="text [variable name]">

Example

<AMVARIABLE NAME="varname">hello</AMVARIABLE>
<AMTEXTPAD ACTION="pad_end" TEXT="Hello" PADDINGCHAR="_" LENGTH="10" RESULTVARIABLE="varname">
<AMMESSAGEBOX>%varname%</AMMESSAGEBOX>

General Tab Parameters

Text to pad: Specifies target text to be padded.  

Text, Required
MARKUP: TEXT="My Name is Joe"

Pad: Specifies the location of that the padding should be applied.

  • pad_end: The text be padded to the end

  • pad_beginning: The text be padded to the beginning

  • pad_both: The text be padded to the beginning and end.

text [options], Optional Default is pad_beginning
MARKUP: ACTION="pad_end"

Character to pad with: Specifies text to use as the padding character.  

Text, Required
MARKUP: PADDINGCHAR=" "

Padding type: Specifies the location of that the padding should be applied.

  • length: The padding will be repeated until the text reaches a certain length

  • amount: The padding will be repeated x number of times regardless of the text length

text [options], Optional Default is length
MARKUP: PADTYPE="amount"

Length of text: Specifies text the length that the text should be padded to.

Number, Required if PADTYPE is length
MARKUP: LENGTH="10"

Populate variable with result: Specifies the variable to receive the new value.

Text [variable name], Required
MARKUP: RESULTVARIABLE="varname"