ScriptTap
ArrayGet/Set

Command video guide

ArrayGet/Set

ArrayGet reads an indexed item into a variable. ArraySet writes into an existing typed array family. This Overview shows the options without Test or Play. The five mode tabs provide complete working examples.

The Get/Set switch in the Advanced palette selects which command you manually drag into the script. It does not change an existing placed command. Use In selects This Script Only or Script Thread; match the declaration, source and output context. Array Letter is the one-letter family. Index is one-based and can use an Integer literal or an earlier Integer variable.

ArrayGet reads the chosen position into Output. Value Type offers Integer, Decimal, Boolean, Hex, String and Time; it does not convert the source to another type. Missing, unwritten, incompatible or out-of-domain reads return the selected typed zero rather than confirming usable source data.

Declare an ArraySet destination earlier with SetVariable, using the required type, scope and enough capacity. Single writes one indexed Literal or earlier Variable value. The selected Value Source determines whether a name such as i1 is a variable reference.

Bulk has explicitly indexed rows, each with Literal, Variable source and Enabled controls. Add with plus, disable to skip, or remove with the row X. The Paste field and Paste Rows convert literal entries such as 1:4;2:8 into editable rows. Review them before saving. At most 255 total rows are accepted; oversized batches are not silently truncated.

Fill Range repeats one literal or earlier typed value across Start and Count. Count is the number of positions, not the final index. Start 2 and Count 3 target positions 2, 3 and 4. Sequence fixes Value Type to Integer and generates First, then adds Step for each following position. First and Step may use Integer literals or earlier Integer variables. Negative steps count down; Integer overflow clamps like ModVariable.

Keep complete ranges within the declared capacity. Count 0 writes nothing. Bulk, Fill Range and Sequence validate the whole batch before publication; invalid enabled rows, duplicate Bulk indexes or bad ranges can reject it without partial writes. True ArraySet mode changes clear outgoing mode-only fields. Review active fields before OK. This tour cancels both drafts and does not run a script.

Overview

Step-by-step guide

  1. Step 01

    Array Get reads one item from an array into a variable. Array Set writes values into an existing array. Use them when a script needs to work with an item by its position, rather than giving every operation a fixed variable name. This overview shows the choices without playing a demonstration.

    ArrayGet / ArraySet: Overview step 1: Array Get reads one item from an array into a variable. Array Set writes values into an existing array. Use them when a script needs to work with an item by its position, rather than giving every operation a fixed variable name. This overview shows the choices without playing a demonstration.
  2. Step 02

    Create a blank script for this option tour. The separate mode tabs show complete examples, including the earlier declarations and supporting commands needed to display each result.

    ArrayGet / ArraySet: Overview step 2: Create a blank script for this option tour. The separate mode tabs show complete examples, including the earlier declarations and supporting commands needed to display each result.
  3. Step 03

    Give the new script a name, then open its editor. We will inspect both commands and cancel their draft changes when finished.

    ArrayGet / ArraySet: Overview step 3: Give the new script a name, then open its editor. We will inspect both commands and cancel their draft changes when finished.
  4. Step 04

    Open Advanced and find the array entry. Its Get and Set switch chooses which command you drag into the script. Keep Get, drag the command across, and open the row you placed.

    ArrayGet / ArraySet: Overview step 4: Open Advanced and find the array entry. Its Get and Set switch chooses which command you drag into the script. Keep Get, drag the command across, and open the row you placed.
  5. Step 05

    Use In selects the variable context. This Script Only keeps values local to this script. Script Thread shares values with related scripts in the same thread. Match this choice to the declaration and the commands using the values. We will inspect the tour in local scope.

    ArrayGet / ArraySet: Overview step 5: Use In selects the variable context. This Script Only keeps values local to this script. Script Thread shares values with related scripts in the same thread. Match this choice to the declaration and the commands using the values. We will inspect the tour in local scope.
  6. Step 06

    Array Letter identifies the one-letter family. Index selects a position, starting at one, and accepts an Integer value or an earlier Integer variable. Output is the variable receiving the selected value. This reads the array; it does not remove or change the item.

    ArrayGet / ArraySet: Overview step 6: Array Letter identifies the one-letter family. Index selects a position, starting at one, and accepts an Integer value or an earlier Integer variable. Output is the variable receiving the selected value. This reads the array; it does not remove or change the item.
  7. Step 07

    Value Type offers Integer, Decimal, Boolean, Hex, String, and Time. Choose the type of the stored item and its output. Array Get does not convert between these types. A missing, unwritten, incompatible, or out-of-range read returns the selected type's zero value, so check your setup rather than treating that fallback as confirmed data.

    ArrayGet / ArraySet: Overview step 7: Value Type offers Integer, Decimal, Boolean, Hex, String, and Time. Choose the type of the stored item and its output. Array Get does not convert between these types. A missing, unwritten, incompatible, or out-of-range read returns the selected type's zero value, so check your setup rather than treating that fallback as confirmed data.
  8. Step 08

    Close this draft with the X. Back in the palette, switch to Set, then drag a second command into the script and open it. Get and Set are separate placed commands; the palette switch does not change one already in your script.

    ArrayGet / ArraySet: Overview step 8: Close this draft with the X. Back in the palette, switch to Set, then drag a second command into the script and open it. Get and Set are separate placed commands; the palette switch does not change one already in your script.
  9. Step 09

    Array Set offers Single, Bulk, Fill Range, and Sequence. Before a working script uses any of them, declare the destination array with Set Variable, using the required type, scope, and enough capacity. Array Set writes into that family; it is not an array declaration.

    ArrayGet / ArraySet: Overview step 9: Array Set offers Single, Bulk, Fill Range, and Sequence. Before a working script uses any of them, declare the destination array with Set Variable, using the required type, scope, and enough capacity. Array Set writes into that family; it is not an array declaration.
  10. Step 10

    Single writes one value at the chosen Index. Value Source selects Literal for a fixed value, or Variable for a value produced earlier. The source must have the selected type. A name such as i1 refers to a variable only when Variable is selected.

    ArrayGet / ArraySet: Overview step 10: Single writes one value at the chosen Index. Value Source selects Literal for a fixed value, or Variable for a value produced earlier. The source must have the selected type. A name such as i1 refers to a variable only when Variable is selected.
  11. Step 11

    Bulk lets one command write several explicitly indexed rows. Each row has its own Index, Literal, Value Source, Source variable, and Enabled control. The value type and scope apply to the whole command. Use the plus to add a row, disable a row to skip it, or use its X to remove it.

    ArrayGet / ArraySet: Overview step 11: Bulk lets one command write several explicitly indexed rows. Each row has its own Index, Literal, Value Source, Source variable, and Enabled control. The value type and scope apply to the whole command. Use the plus to add a row, disable a row to skip it, or use its X to remove it.
  12. Step 12

    The Paste field and Paste Rows button provide a shortcut for entering literal rows. For example, index one, colon four, then index two, colon eight, creates two assignments when separated by a semicolon. Review the resulting rows before saving. Bulk supports up to two hundred and fifty-five total rows; it does not silently trim an oversized batch.

    ArrayGet / ArraySet: Overview step 12: The Paste field and Paste Rows button provide a shortcut for entering literal rows. For example, index one, colon four, then index two, colon eight, creates two assignments when separated by a semicolon. Review the resulting rows before saving. Bulk supports up to two hundred and fifty-five total rows; it does not silently trim an oversized batch.
  13. Step 13

    Fill Range writes the same literal or earlier variable value across a continuous range. Start is the first destination position. Count is how many positions to fill, not the final index. Start two and Count three refers to positions two, three, and four.

    ArrayGet / ArraySet: Overview step 13: Fill Range writes the same literal or earlier variable value across a continuous range. Start is the first destination position. Count is how many positions to fill, not the final index. Start two and Count three refers to positions two, three, and four.
  14. Step 14

    Sequence writes an Integer progression. Start and Count choose the destination range. First is the value written at the first position; Step is the amount added for each following position. First ten and Step two would produce ten, twelve, fourteen, and so on. This mode fixes Value Type to Integer.

    ArrayGet / ArraySet: Overview step 14: Sequence writes an Integer progression. Start and Count choose the destination range. First is the value written at the first position; Step is the amount added for each following position. First ten and Step two would produce ten, twelve, fourteen, and so on. This mode fixes Value Type to Integer.
  15. Step 15

    Range inputs can use earlier Integer variables as well as fixed values. Keep the complete range within the declared capacity; a Count of zero writes nothing. Sequence also accepts Integer variables for First and Step. Negative steps count down, and Integer overflow is clamped like Mod Variable.

    ArrayGet / ArraySet: Overview step 15: Range inputs can use earlier Integer variables as well as fixed values. Keep the complete range within the declared capacity; a Count of zero writes nothing. Sequence also accepts Integer variables for First and Step. Negative steps count down, and Integer overflow is clamped like Mod Variable.
  16. Step 16

    Bulk, Fill Range, and Sequence validate the complete batch before publishing it. Duplicate enabled Bulk indexes, invalid values, or an invalid destination range can reject the batch without partially writing it. Declare the right family and inspect run warnings when a result is not what you expected.

    ArrayGet / ArraySet: Overview step 16: Bulk, Fill Range, and Sequence validate the complete batch before publishing it. Duplicate enabled Bulk indexes, invalid values, or an invalid destination range can reject the batch without partially writing it. Declare the right family and inspect run warnings when a result is not what you expected.
  17. Step 17

    Changing Array Set mode clears fields belonging only to the outgoing mode. Review the active fields before using OK. This tour closes with the X without saving its draft or playing. Choose a mode tab to see the shortest useful script and its actual result.

    ArrayGet / ArraySet: Overview step 17: Changing Array Set mode clears fields belonging only to the outgoing mode. Review the active fields before using OK. This tour closes with the X without saving its draft or playing. Choose a mode tab to see the shortest useful script and its actual result.