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
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.
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.
Step 03 Give the new script a name, then open its editor. We will inspect both commands and cancel their draft changes when finished.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 reads one position from an array and copies its value into an output variable. Use it when a later command needs an item chosen by your script, without changing the original array.
This guide builds a short working example: declare Integer array a with three slots, set a2 to 7, and set Integer index i1 to 2. ArrayGet then reads a[i1] into i2. Display shows 7 for five seconds, and PromptMe provides a Done confirmation.
Choose Get on the shared ArrayGet/Set palette tile before dragging it into the script. The existing command row keeps its original Get or Set type. This video covers ArrayGet, the read operation.
Declare the array before reading it. Match its scope and Value Type: Integer, Decimal, Boolean, Hex, String, or Time. This Script Only is local; Script Thread shares variables within the calling script thread.
Positions start at 1. Index accepts a literal position or a previously set Integer variable. An unwritten, invalid, or incompatible read returns the selected type’s neutral value, such as zero or an empty String. Check the declaration, type, scope, and index if the result is unexpectedly empty.
Read an array value with ArrayGet
Step-by-step guide
Step 01 Array Get copies a value from a chosen array position into another variable. An array is a numbered collection of values. Using an Integer variable as the index lets your script choose which item to read.
Step 02 Create a new blank script.
Step 03 Open the new script's menu and choose Rename.
Step 04 Give the script a clear name and save it.
Step 05 Select the new script, close the library, and open its editor.
Step 06 Under Variables, drag SetVariable into the live script and open its row. We first need an array for Array Get to read.
Step 07 Switch to Array mode. This reserves a numbered group of slots rather than setting one variable.
Step 08 Keep Integer because this example stores whole numbers.
Step 09 Use array letter a and capacity three. Its positions are a one, a two, and a three. The declaration must run before Array Get.
Step 10 Drag in a second SetVariable command below the declaration and open it.
Step 11 Keep Single mode with the Integer type.
Step 12 Set a two to seven. This fills the second array position with a value we can recognize later.
Step 13 Save that command. These setup steps give Array Get a real value to retrieve.
Step 14 Add one more SetVariable command for the index.
Step 15 Choose Integer, set its name to i one, and give it value two. Changing this value would make Array Get read a different position.
Step 16 Under Advanced, the shared tile switches between Get for reading and Set for writing. Choose Get before dragging. An existing row keeps its original command type.
Step 17 Now drag Array Get below the setup commands and open its new row.
Step 18 Match the array's scope. This Script Only is local. Script Thread shares variables within the calling script thread. We will keep This Script Only throughout this example.
Step 19 Set Array Letter to a. Enter only the family letter here, not a numbered slot name.
Step 20 Value Type must match the declared array. Integer, Decimal, Boolean, Hex, String, and Time are available. Keep Integer for this number array.
Step 21 Set Index to i one. Array Get uses its current Integer value, two, so this execution reads a two. You can also enter a literal position directly.
Step 22 Set Output to i two. The retrieved number is copied there; reading does not remove or change the original array value.
Step 23 Positions start at one. An unwritten, invalid, or incompatible read returns the selected type's neutral value, such as zero or an empty String. Check the array, type, and index if a result is unexpectedly empty.
Step 24 Save Array Get.
Step 25 Drag Display below Array Get and open it. This supporting command makes the retrieved number visible.
Step 26 Keep Once, choose Variable, and set i two as the source.
Step 27 Open the area's coordinate editor. Set the top left to one hundred, three hundred, and the bottom right to four hundred forty, six hundred. This defines where the result appears.
Step 28 Set Lifespan to five thousand milliseconds, or five seconds, then save. Display will show the number before the script continues.
Step 29 Finally, drag PromptMe below Display and open it. This gives us a clear confirmation at the end.
Step 30 Keep Standard mode and use Complete as the header.
Step 31 Add a Done button with Boolean output b one, then save. The button lets us confirm the result and finish the script.
Step 32 The first three commands prepare the array, value, and index. Array Get performs the read. Display shows the number, and PromptMe confirms completion.
Step 33 Close the editor and expand the main overlay.
Step 34 When the script is complete, simply use the Play button in the main overlay.
Step 35 Display shows seven, the value from position two.
Step 36 After five seconds, the confirmation appears. Choose Done to finish.
Step 37 The script finishes automatically after confirmation. Use Array Get whenever later commands need a value from a position chosen by your script.
ArraySet writes to an existing typed array. Declare it first with SetVariable Array mode, then match its array letter, Value Type and scope. Positions start at 1 and must remain inside the declared capacity, up to 4096. This Script Only is local; Script Thread shares the calling thread scope. Array values stay exact; use AppendPoints for adaptive coordinate arrays.
Single mode updates one chosen position without changing the others. Index accepts a literal or a prior Integer variable. Value Source Literal stores the entered value; Variable reads a prior matching typed variable. Integer, Decimal, Boolean, Hex, String and Time arrays are supported. Invalid indexes, types or declarations skip the write.
This Intro builds a fresh four-command example using genuine palette drags: declare Integer array a with capacity three; write 25 into a2; Display a2 for five seconds; and show Updated/Done with PromptMe. Choose Set on the shared palette tile before dragging. An existing Get/Set command retains its original type.
ArraySet — Intro & Single
Step-by-step guide
Step 01 Array Set changes values in an existing array. An array is a numbered collection of values. Unlike Array Get, which reads a value, Array Set writes a new value into the position your script chooses.
Step 02 Open the main overlay menu, choose Scripts, and create a new blank script.
Step 03 Scroll through the Library until the new script is visible. New blank scripts have a default numbered name. Open that entry's menu and choose Rename. A clear name makes your example easier to find later.
Step 04 Give your script a clear name and confirm it.
Step 05 Select the new script, close the Library, and open its editor. Minimize the main overlay if it covers the command palette.
Step 06 Command groups expand to show their tools. Close an unused group, then expand Variables.
Step 07 First, drag SetVariable from Variables into the script. Array Set needs an array declaration before it can write values.
Step 08 Switch to Array mode. This reserves a numbered group of positions instead of setting one variable.
Step 09 Keep Integer, use array letter a, and set capacity to three. These positions are a one, a two, and a three. Save the declaration.
Step 10 Expand Advanced and scroll to the shared Array Get and Set tile. Choose Set before dragging it. An existing command keeps its original Get or Set type.
Step 11 Drag Array Set below the declaration, then open its settings.
Step 12 Match the array's scope. This Script Only keeps it local; Script Thread shares it within the calling script thread. We'll choose This Script Only.
Step 13 Enter array letter a. The letter identifies the array, while the index chooses a numbered position inside it.
Step 14 Match the declared Value Type. Integer, Decimal, Boolean, Hex, String, and Time are supported. Our array contains whole numbers, so keep Integer.
Step 15 Single writes one position. Bulk writes a list of rows. Fill Range repeats one value across a range, and Sequence generates Integer values. The other Array Set tabs explain those modes. We'll use Single here.
Step 16 Set Index to two. Positions start at one. An index can also come from an Integer variable set earlier, allowing your script to choose the position while it runs.
Step 17 Literal uses the value you enter here. Variable instead reads a previously written variable of the matching type. We'll show that option, then return to Literal for this example.
Step 18 Enter twenty-five. This writes twenty-five into a two without changing the other positions. Stay within the declared capacity. An invalid index, type, or declaration causes the write to be skipped. Save Array Set.
Step 19 To see the value during play, drag Display from Device below Array Set and open it.
Step 20 Keep Display Text once, choose Variable as its source, and enter a two. This supporting command will show the value that Array Set wrote.
Step 21 Set a visible display area. We'll use left one hundred, top three hundred, right four hundred forty, and bottom six hundred. Confirm the area.
Step 22 Set the lifespan to five thousand milliseconds and save. That gives us five seconds to read the result before continuing.
Step 23 Drag PromptMe below Display as a visible completion check, then open it.
Step 24 Keep Standard mode and use Updated as the header.
Step 25 Add a button, give it the caption Done, and assign b one as its Boolean output. Save PromptMe.
Step 26 Our four commands declare the array, update its second position, display that value, and show confirmation. The supporting commands make Array Set's result visible.
Step 27 Close the editor and expand the main overlay.
Step 28 When the script is complete, simply use the Play button in the main overlay.
Step 29 Display shows twenty-five, the value now stored in a two. The other commands can use this updated value too.
Step 30 PromptMe confirms that the script reached the end. Tap Done, and the script finishes automatically.
Step 31 Use Single when you need to update one array position. Continue with the other Array Set tabs to write several values using the same short script.
ArraySet writes to an existing typed array. Declare it first with SetVariable Array mode, then match its array letter, Value Type and scope. Positions start at 1 and must remain inside the declared capacity, up to 4096. This Script Only is local; Script Thread shares the calling thread scope. Array values stay exact; use AppendPoints for adaptive coordinate arrays.
Bulk writes up to 255 enabled rows. Each row has its own Index, Literal or Variable source, and Enabled flag. Disabled rows retain their settings without writing. Plus adds a row; its addressed red X removes it.
Paste accepts index:value or index=value pairs separated by commas, semicolons or new lines. Paste Rows replaces the list with those literal pairs. The example uses 1:10,2:25,3:99, then disables the third row. The enabled rows are preflighted together: invalid values, indexes or duplicate resolved indexes reject the batch without a partial update. Display reads a2=25; PromptMe confirms completion.
ArraySet — Bulk
Step-by-step guide
Step 01 Bulk mode writes several chosen positions in one array. Each row has its own index and value source. We'll use the four-command script built in the Array Set Intro, so the result can be displayed immediately.
Step 02 Choose Bulk. Keep array a, Integer, and the same local scope as the declaration. Changing modes clears settings that belong only to the old mode.
Step 03 For literal values, the Paste field accepts index and value pairs separated by a colon or equals sign. Commas, semicolons, or new lines separate the pairs. We'll enter one colon ten, two colon twenty-five, and three colon ninety-nine.
Step 04 Choose Paste Rows to replace the row list with those pairs. Each pair becomes a separate editable row. Scroll to see its index, literal value, source, and Enabled control.
Step 05 Each row can use a Literal or read a previously written Variable of the matching type. In Variable mode, fill Source. Our rows use Literal, so the Source field is not used.
Step 06 Scroll to the third row and turn Enabled off. A disabled row keeps its settings but performs no write.
Step 07 Use the plus to add more rows manually, up to two hundred fifty-five. The addressed red X removes that row entirely.
Step 08 Indexes start at one and must fit the declared array. The enabled rows are checked before any writes are published. Invalid values or duplicate resolved indexes reject the batch without a partial update.
Step 09 The array declaration stays first. Bulk writes ten into a one and twenty-five into a two. The disabled third row leaves a three unwritten. Display still reads a two, and PromptMe confirms completion.
Step 10 Close the editor and expand the main overlay.
Step 11 When the script is complete, simply use the Play button in the main overlay.
Step 12 Display shows twenty-five from the second position. The disabled third row has not written a three.
Step 13 The Updated prompt confirms completion. Tap Done to finish the run.
Step 14 Use Bulk for a list of specific positions and values. Use Fill Range to repeat one value, or Sequence to generate a progression of whole numbers.
ArraySet writes to an existing typed array. Declare it first with SetVariable Array mode, then match its array letter, Value Type and scope. Positions start at 1 and must remain inside the declared capacity, up to 4096. This Script Only is local; Script Thread shares the calling thread scope. Array values stay exact; use AppendPoints for adaptive coordinate arrays.
Fill Range repeats one literal or prior matching typed variable across consecutive positions. Start is the first destination index; Count is the number of positions. Both accept Integer literals or prior Integer variables. A valid Count of zero writes nothing. The complete range is checked before publishing; invalid setup leaves no partial range.
Start 1, Count 3 and Literal 25 fill a1, a2 and a3. The existing Display reads a2=25, followed by the Updated/Done confirmation. Build the supporting script in the ArraySet Intro & Single tab.
ArraySet — Fill Range
Step-by-step guide
Step 01 Fill Range writes the same value into consecutive array positions. It's useful when several items need the same starting or replacement value. We'll continue with the short script built in the Array Set Intro.
Step 02 Choose Fill Range. Keep array a, Integer, and the local scope that matches the declaration.
Step 03 Set Start to one and Count to three. Start is the first array position, not the first value. Count is how many consecutive positions to write. These settings can also use Integer variables written earlier.
Step 04 Choose Literal and enter twenty-five. Variable instead reads a prior variable of the matching type. This example fills a one, a two, and a three with twenty-five.
Step 05 The entire range must fit the declared array. A count of zero writes nothing. Invalid settings reject the range without a partial update. Save the command.
Step 06 The declaration, Display, and PromptMe remain unchanged. Display reads a two, which is inside the range we filled.
Step 07 Close the editor and expand the main overlay.
Step 08 When the script is complete, simply use the Play button in the main overlay.
Step 09 Display shows twenty-five from a two, which is inside the range we filled.
Step 10 The Updated prompt confirms completion. Tap Done to finish.
Step 11 Use Fill Range to repeat one value across consecutive positions. For values that change by a fixed step, use Sequence instead.
ArraySet writes to an existing typed array. Declare it first with SetVariable Array mode, then match its array letter, Value Type and scope. Positions start at 1 and must remain inside the declared capacity, up to 4096. This Script Only is local; Script Thread shares the calling thread scope. Array values stay exact; use AppendPoints for adaptive coordinate arrays.
Sequence generates Integer values in consecutive positions. Start chooses the first destination; Count chooses how many positions. First is the starting value and Step is the difference added for each next value. These settings accept Integer literals or prior Integer variables. A negative Step counts down. Sequence uses Integer arrays only, with the same signed Integer clamping as ModVariable.
Start 1, Count 3, First 10 and Step 5 write 10,15,20 into a1, a2 and a3. Display reads the second position and shows 15. A valid Count of zero writes nothing; invalid settings or capacity violations reject the sequence without a partial update. The Intro builds the shared script.
ArraySet — Sequence
Step-by-step guide
Step 01 Sequence fills consecutive array positions with a progression of whole numbers. Each next value adds the step you choose. We'll use the same short script from the Array Set Intro.
Step 02 Choose Sequence. This mode uses Integer values. Keep array a and the scope that matches its declaration.
Step 03 Set Start to one and Count to three. These choose the first array position and the number of positions to write.
Step 04 Set First to ten and Step to five. The values will be ten, fifteen, and twenty. A negative step counts downward. These settings can also use Integer variables written earlier.
Step 05 The full range must fit the declared Integer array. A zero count writes nothing. Invalid settings cause the sequence to be skipped without a partial update. Save the command.
Step 06 Display still reads a two. That is the second position, so we expect fifteen, not the first value of ten. The declaration and confirmation stay unchanged.
Step 07 Close the editor and expand the main overlay.
Step 08 When the script is complete, simply use the Play button in the main overlay.
Step 09 Display shows fifteen from the second position, between ten and twenty in our sequence.
Step 10 The Updated prompt confirms completion. Tap Done to finish the run.
Step 11 Use Sequence to generate evenly stepped Integer data. Start chooses where to write, First chooses the starting value, and Step controls the difference between values.