ScriptTap
TextTransform

Command video guide

TextTransform

TextTransform edits or interprets text already available to a script, preparing messages, comparisons, extracted information and numbers for later commands. This Overview shows all ten operations without running a script. The separate demonstration tabs keep their complete supporting setup and real results.

Use In selects This Script Only or Script Thread for outputs. Except for Join, Input Source accepts entered Text or an earlier String variable. Similar source controls are available for Contains Find, Extract Pattern, Replace Find and Replacement, and Split or Join delimiters. Find All Pattern is entered directly. A new operation has different required fields; changing Operation resets its outgoing operation-specific settings. Review the form before saving.

Contains saves a Boolean result and has a Case Sensitive switch. Extract uses a regular expression and saves one group from the first match as a String. Group 0 selects the whole match; positive numbers select captured groups. Allow No Match accepts an empty String when nothing matches. Replace accepts Literal or Regex searches, entered or variable replacements, and first-only or Replace All changes. Regex replacements can refer to captured groups.

Split separates text using a Literal or Regex delimiter. Its required Max Parts is 1–4096; the last piece can retain the remainder. Enter an existing String array letter and one-based Start, and optionally save the number of pieces to an Integer. Join combines a String array range in slot order using a delimiter, with a String result. It uses Array, Start and Count instead of the usual text Input. Start and Count are required positive integers or prior Integer variables, with supported domain 1–4096. Unwritten slots act as empty entries, preserving separators; the requested range must contain usable String data.

Trim removes boundary whitespace from Both, Left or Right, not spaces inside the text. Case selects Lower or Upper. Both save String results. Parse Int converts number text to an Integer using a base from 2–36; base 10 is decimal and 16 is hexadecimal. Its optional Default Value supplies an Integer fallback when parsing fails. Parse Decimal converts fractional numeric text to a Decimal and does not preserve String formatting such as trailing zeroes. It has no Default switch.

Find All collects matches in a String array. Exact compares the entire input and produces at most one result; Contains collects literal, case-sensitive occurrences, including overlaps. Regex uses a regular expression. Whole Match saves complete matches; Regex can instead save a positive Capture Group. Max Matches accepts 0–4096; zero collects none. Enter the output array letter and one-based Start and optionally save an Integer count. Declare enough correctly typed array space first, and keep complete requested ranges within capacity; Find All reserves for its requested maximum rather than only expected matches. Literal or prior Integer variables are supported in numeric position and limit fields where applicable.

Result Outputs optionally saves Success to a Boolean and Error to a String, separately from the main result. False from Contains can still be a successful check. A successful Parse Int fallback can also produce a diagnostic explaining that it was used. This tour closes without Save or Play. Choose a demonstration tab for a working script and its visible outcome.

Overview

Step-by-step guide

  1. Step 01

    TextTransform edits or interprets text already available to your script. Use it to clean up a message, find useful information, or convert text into numbers for later commands. This overview explains the options without running a script.

    TextTransform: Overview step 1: TextTransform edits or interprets text already available to your script. Use it to clean up a message, find useful information, or convert text into numbers for later commands. This overview explains the options without running a script.
  2. Step 02

    Drag TextTransform from Variables into the script, then open its settings. Operation selects the kind of transformation you need.

    TextTransform: Overview step 2: Drag TextTransform from Variables into the script, then open its settings. Operation selects the kind of transformation you need.
  3. Step 03

    Use In chooses whether the result belongs to This Script Only or the wider Script Thread. Choose the scope needed by the commands that will use the result.

    TextTransform: Overview step 3: Use In chooses whether the result belongs to This Script Only or the wider Script Thread. Choose the scope needed by the commands that will use the result.
  4. Step 04

    For most operations, Input Source accepts Text you enter here, or a String variable written earlier in the script. Similar source selectors let find text, patterns, replacements, and delimiters come from text or a String variable too.

    TextTransform: Overview step 4: For most operations, Input Source accepts Text you enter here, or a String variable written earlier in the script. Similar source selectors let find text, patterns, replacements, and delimiters come from text or a String variable too.
  5. Step 05

    Contains checks whether the input includes the Find text and saves True or False to a Boolean variable. Case Sensitive controls whether letter case matters. Turn it off when, for example, upper and lower case should count as the same text.

    TextTransform: Overview step 5: Contains checks whether the input includes the Find text and saves True or False to a Boolean variable. Case Sensitive controls whether letter case matters. Turn it off when, for example, upper and lower case should count as the same text.
  6. Step 06

    Extract uses a regular expression, or regex: a pattern that describes text to match. It returns one part of the first match as a String. Group zero means the entire match; positive group numbers select captured parts. Allow No Match accepts an empty result when nothing matches, instead of reporting that as a failed extraction.

    TextTransform: Overview step 6: Extract uses a regular expression, or regex: a pattern that describes text to match. It returns one part of the first match as a String. Group zero means the entire match; positive group numbers select captured parts. Allow No Match accepts an empty result when nothing matches, instead of reporting that as a failed extraction.
  7. Step 07

    Replace changes matching text and saves the edited String. Literal looks for the exact characters you supply. Regex uses a pattern, and its replacement can refer to captured groups. Find Source and Replacement each support entered text or a String variable.

    TextTransform: Overview step 7: Replace changes matching text and saves the edited String. Literal looks for the exact characters you supply. Regex uses a pattern, and its replacement can refer to captured groups. Find Source and Replacement each support entered text or a String variable.
  8. Step 08

    Scroll down for the replacement value, Replace All, and the String destination. Replace All changes every occurrence; turn it off to change only the first. Use a different output variable when you need to keep the original text as well.

    TextTransform: Overview step 8: Scroll down for the replacement value, Replace All, and the String destination. Replace All changes every occurrence; turn it off to change only the first. Use a different output variable when you need to keep the original text as well.
  9. Step 09

    Split breaks one String into pieces using a delimiter, such as a comma. Choose Literal for fixed separator text, or Regex for a separator pattern. Max Parts is a required positive limit on the number of pieces; the last piece can retain the remaining text.

    TextTransform: Overview step 9: Split breaks one String into pieces using a delimiter, such as a comma. Choose Literal for fixed separator text, or Regex for a separator pattern. Max Parts is a required positive limit on the number of pieces; the last piece can retain the remaining text.
  10. Step 10

    Split writes its pieces into an existing String array. Enter its single array letter and a one-based Start slot. Enable Save Count to store the number of pieces in an Integer variable. Declare enough array space before this command, and keep the complete output range within that capacity.

    TextTransform: Overview step 10: Split writes its pieces into an existing String array. Enter its single array letter and a one-based Start slot. Enable Save Count to store the number of pieces in an Integer variable. Declare enough array space before this command, and keep the complete output range within that capacity.
  11. Step 11

    Join does the reverse: it combines a range from a String array into one String, with a delimiter between entries. Its inputs are the array letter, Start, and Count, rather than the usual text input. Slots are read in order; unwritten slots act as empty entries, so their separators are preserved.

    TextTransform: Overview step 11: Join does the reverse: it combines a range from a String array into one String, with a delimiter between entries. Its inputs are the array letter, Start, and Count, rather than the usual text input. Slots are read in order; unwritten slots act as empty entries, so their separators are preserved.
  12. Step 12

    Trim removes whitespace from the edges of a String, without changing spaces inside the text. Both cleans the beginning and end; Left cleans only the beginning, and Right only the end. The cleaned text goes to a String variable.

    TextTransform: Overview step 12: Trim removes whitespace from the edges of a String, without changing spaces inside the text. Both cleans the beginning and end; Left cleans only the beginning, and Right only the end. The cleaned text goes to a String variable.
  13. Step 13

    Case standardizes letter case. Choose Lower to make letters lowercase, or Upper to make them uppercase, then name the String output. This is useful when later text comparisons need consistent capitalization.

    TextTransform: Overview step 13: Case standardizes letter case. Choose Lower to make letters lowercase, or Upper to make them uppercase, then name the String output. This is useful when later text comparisons need consistent capitalization.
  14. Step 14

    Parse Int converts number text into an Integer for calculations or comparisons. Base tells it how to read the digits: ten is ordinary decimal, while sixteen reads hexadecimal. The supported base range is two through thirty-six. Supply a base and an Integer output.

    TextTransform: Overview step 14: Parse Int converts number text into an Integer for calculations or comparisons. Base tells it how to read the digits: ten is ordinary decimal, while sixteen reads hexadecimal. The supported base range is two through thirty-six. Supply a base and an Integer output.
  15. Step 15

    Default provides a fallback Integer when the input cannot be parsed. Turn it on to reveal Value. Without a fallback, invalid number text reports a conversion failure. With one, the fallback can be written successfully while the optional Error output still explains that it was used.

    TextTransform: Overview step 15: Default provides a fallback Integer when the input cannot be parsed. Turn it on to reveal Value. Without a fallback, invalid number text reports a conversion failure. With one, the fallback can be written successfully while the optional Error output still explains that it was used.
  16. Step 16

    Parse Decimal converts decimal number text into a Decimal variable. Use it when a value can have a fractional part. It saves a number, not the original text formatting, so trailing zeroes need not remain. This operation has no Default fallback switch.

    TextTransform: Overview step 16: Parse Decimal converts decimal number text into a Decimal variable. Use it when a value can have a fractional part. It saves a number, not the original text formatting, so trailing zeroes need not remain. This operation has no Default fallback switch.
  17. Step 17

    Find All collects matches into a String array. Exact compares the entire input with Pattern, so it can produce at most one match. Contains collects literal occurrences, including overlapping ones. Regex searches using a regular expression. These matches are case-sensitive.

    TextTransform: Overview step 17: Find All collects matches into a String array. Exact compares the entire input with Pattern, so it can produce at most one match. Contains collects literal occurrences, including overlapping ones. Regex searches using a regular expression. These matches are case-sensitive.
  18. Step 18

    For Regex, Result can save each Whole Match or a Capture Group from each match. Capture Group reveals the positive group number to collect. Exact and Contains use Whole Match instead. Max Matches limits how many results are collected; zero collects none.

    TextTransform: Overview step 18: For Regex, Result can save each Whole Match or a Capture Group from each match. Capture Group reveals the positive group number to collect. Exact and Contains use Whole Match instead. Max Matches limits how many results are collected; zero collects none.
  19. Step 19

    Enter the destination String array letter and Start, and optionally save the match count to an Integer. Results occupy consecutive slots from Start. Reserve space for the requested maximum, not just the number you expect to find. Numeric limits and positions can use literal integers or earlier Integer variables where supported.

    TextTransform: Overview step 19: Enter the destination String array letter and Start, and optionally save the match count to an Integer. Results occupy consecutive slots from Start. Reserve space for the requested maximum, not just the number you expect to find. Numeric limits and positions can use literal integers or earlier Integer variables where supported.
  20. Step 20

    Result Outputs adds optional status information. Enable Save Outputs, then Success for a Boolean status, and Error for a String diagnostic. Each needs its own destination. These describe the operation, separately from its main text, number, array, or Contains result.

    TextTransform: Overview step 20: Result Outputs adds optional status information. Enable Save Outputs, then Success for a Boolean status, and Error for a String diagnostic. Each needs its own destination. These describe the operation, separately from its main text, number, array, or Contains result.
  21. Step 21

    A False Contains result can still be a successful check: it simply found no such text. Likewise, a successful fallback may have a useful diagnostic. Check the main result and status separately when later commands need to distinguish a normal outcome from a problem.

    TextTransform: Overview step 21: A False Contains result can still be a successful check: it simply found no such text. Likewise, a successful fallback may have a useful diagnostic. Check the main result and status separately when later commands need to distinguish a normal outcome from a problem.
  22. Step 22

    Changing Operation resets its operation-specific settings, so review the required fields afterward. This was a settings tour; close it without saving or playing. Choose a demonstration tab for the complete supporting setup and visible result of a particular operation.

    TextTransform: Overview step 22: Changing Operation resets its operation-specific settings, so review the required fields afterward. This was a settings tour; close it without saving or playing. Choose a demonstration tab for the complete supporting setup and visible result of a particular operation.