Command video guide
SetVariable
SetVariable creates or assigns typed values for later commands: counts, text, condition flags, colors and times. This overview tours the editor without a separate runtime demo. Use the focused tabs for genuine Play and visible result confirmations.
Manually drag SetVariable from Variables into a script, then open the placed row. Single writes one named variable. Use a valid name such as i1 for an Integer example; the gray placeholder is only a hint. Put a writer before its readers, and use the type and scope expected by those readers.
Use In offers This Script Only and Script Thread. The first is script-local; the second supports sharing within the related script-play chain. It is not a permanent global value across unrelated runs. The tour keeps This Script Only.
Integer is for whole-number counts and coordinates. Decimal is for fractional or measured values; the editor shows accepted numeric spellings. Boolean is True/False for flags and conditions, not a String containing those words. Hex is for supported hexadecimal values, commonly six-digit colors. String stores text for typing, prompts, comparisons and processing. Time stores supported clock/date values for Time-aware commands.
String Single includes Set from clipboard. It uses clipboard input instead of manual text and requires consent. This tour leaves it off and never reads or displays clipboard contents.
Array uses one array letter and Capacity, not a numbered destination such as v1. Capacity accepts 1–4096 or a prior Integer variable. Ordinary Array mode declares a typed collection; explicit Time Generator modes can initialize every entry from one source. The Array and time-specific Array tabs show actual workflows.
For Time, Literal provides direct entry. Time Generator adds format and source controls. Manual AM/PM Format declares Time: Clock has separate numeric Hours/Minutes/Seconds and AM/PM; Whole Time accepts a supported complete literal, optional date, or prior Time variable. These presentations keep separate editor drafts. See Manual · Single and Manual · Array for syntax and real results.
Use Current samples when Play reaches the command, not while editing. Manual input is absent in that source. Array entries use the sampled value. Unix Time declares Decimal epoch seconds, with milliseconds as a fractional part: it is not a Time variable or a millisecond count. It also supports manual and current sources, with Single/Array examples in the Unix tabs.
Incompatible type/format changes can clear fields that no longer apply. Complete the selected mode before playback. The tour returns to a valid basic Integer Single, enters i1 = 7, keeps This Script Only and saves, without pressing Play. Choose the appropriate focused tab to see a useful runtime example.
Overview
Step-by-step guide
Step 01 SetVariable creates or assigns values that later commands can use. Store a count, text, a color, a condition flag, or a time instead of entering the same information repeatedly. This overview explains the editor options. The other tabs provide focused, real playback examples.
Step 02 Drag SetVariable from the Variables palette into the script, then open the placed command. Choose its destination, type, source, and scope before using the value later.
Step 03 Single writes one named variable. Enter a valid ScriptTap name, such as i1 for an Integer example, and provide the required value. The gray name is a hint, not a variable you have already created. Put this writer before the commands that read its result.
Step 04 Use In selects the variable scope: This Script Only or Script Thread. The first keeps the value local to this script; Script Thread is for sharing within the related script-play chain. It is not a permanent global value for unrelated runs. Match the scope used by later consumers.
Step 05 Variable Type determines what the value means. Integer is for whole numbers, such as counts or coordinates. The list also contains Decimal, Boolean, Hex, String, and Time. Choose the type required by the commands that will read this variable.
Step 06 Decimal is for fractional or measured numbers, such as a ratio or a calculated result. Its value field accepts the numeric forms shown by the editor. Keep a Decimal result as Decimal when later commands require that type.
Step 07 Boolean stores True or False. Use it for a flag, such as whether a condition was met, then test it in later logic. It is different from a String containing the words True or False.
Step 08 Hex is for hexadecimal values, commonly used for colors. Enter a supported six-digit color value when that is what your next command expects. Hex is a distinct type, not ordinary text or a decimal count.
Step 09 String stores text for later typing, prompts, comparisons, or text processing. In Single mode, Set from clipboard can use the clipboard instead of manual text and requires consent. We leave it off here and do not read or display any clipboard contents.
Step 10 Switch Single to Array for a typed collection of numbered entries. Enter an array letter, not a numbered entry, and set Capacity from one to four thousand ninety-six, or use an earlier Integer variable. Ordinary Array mode declares the collection; the Time Generator modes can initialize every entry from one source.
Step 11 Time is for clock values and supported dates that later Time-aware commands can use. The Literal option provides direct entry. Time Generator adds explicit format and source choices. Enable it to select AM/PM Format or Unix Format, and Set Manually or Current Time.
Step 12 For manual AM/PM entry, Clock provides Hours, Minutes, Seconds, and AM or PM. Whole Time accepts a complete supported time literal, an optional date, or an earlier Time variable. These presentations retain separate editor drafts. The two Manual guides demonstrate the syntax and actual results.
Step 13 Current Time samples the device time when playback reaches this command, not while you edit it. There is no manual value to enter. In Array mode, the sampled value initializes the entries. Use this source when the value should reflect the moment that step actually runs.
Step 14 Unix Format produces a Decimal number of seconds since the Unix epoch, with milliseconds represented as the fractional part. It is not a Time variable and not a number of milliseconds. Choose a manual epoch value or Current Time. Separate Unix guides cover Single and Array examples.
Step 15 Changing incompatible types or formats can clear fields that no longer apply. Complete the selected mode before playback. To finish this editor tour, return to a basic Integer Single, enter i1 and seven, keep This Script Only, and save. We are not running a separate demo in this overview.
Step 16 Choose the matching tab for the workflow you need: basic Single or Array, manual or current time, and AM/PM or Unix format. Those focused guides use real playback and visible confirmations to show what each option produces.
SetVariable stores a named value so later commands can reuse it. It does not type into an app or display a dialog by itself. This walkthrough covers Single mode and demonstrates a String displayed by a supporting PromptMe command.
Create and name a separate script. Expand Variables, manually drag SetVariable into Live Script, then double-tap the inserted row.
- Integer: whole numbers. Decimal: fractional numbers. Boolean: True or False. Hex: a color. String: text. Time: a time value.
- Name: one English letter, optionally followed by an index from 1 to 4096. Names are case-insensitive. Names sharing a letter in the same scope must share a type. This example uses String
s1. - Use In: This Script Only keeps the value local; Script Thread shares it within the current script thread.
- Value: enter a literal, or a previously written variable of the same type. Define a source variable before using it. The demonstration uses literal text Hello ScriptTap.
- Set from clipboard: a Single String can read the device clipboard when the command runs. Enabling this option requires consent. This example declines and keeps the typed value.
Save with OK; reopen the command to confirm its settings. Manually drag PromptMe after SetVariable. Keep Standard mode, set Header to s1, add a Done button, and use Boolean b1 for that button's output. Leave Use Toggles & Text off. The header resolves the defined String's value; the button flag does not modify it.
Close the editor and use Play. SetVariable assigns the text before PromptMe reads it, so the header displays Hello ScriptTap. Press Done to finish automatically. The same stored value can be reused by later messages, text typing and transformations.
Single Variables
Step-by-step guide
Step 01 Set Variable gives a value a name so later commands can use it. Use it to prepare text, numbers, colors, or flags for a script. Here, we will store some text and display its value with PromptMe.
Step 02 Open the main overlay menu, then choose Scripts to open the Script Library.
Step 03 Tap New Script and choose Blank Script.
Step 04 Scroll to the new row if it is outside the visible list. This will be a separate example; existing scripts remain unchanged.
Step 05 Open the new script's three-dot menu and choose Rename. Give it a descriptive name so it is easy to find again, then tap OK.
Step 06 Select the new script, open the Script Editor, and collapse the extra overlay controls.
Step 07 Collapse Recent if needed. Expand Variables, then drag Set Variable from the palette into the Live Script column. Release at the insertion line. Double-tap the new frame to open its settings.
Step 08 Integer is for whole numbers; Decimal allows fractions; Boolean stores True or False; Hex stores a color; String stores text; and Time stores a time. We will use String in this example. This walkthrough covers Single mode.
Step 09 A variable name uses one English letter, optionally followed by an index from one to four thousand ninety-six. Names ignore letter case. Keep the same type for names that share a letter in the same scope. We will name this String s1.
Step 10 Use In controls the variable's scope. This Script Only keeps it local. Script Thread shares it within the current script thread. We will keep This Script Only.
Step 11 Enter Hello ScriptTap as the value. Set Variable stores this text when the script reaches the command. It does not type into an app or show a dialog by itself.
Step 12 The value can also come from an earlier variable of the same type. Define that source first. Here, we are using literal text.
Step 13 A Single String can also read the current device clipboard when the command runs. That option asks for consent. We will decline and keep our typed value.
Step 14 Tap OK. The script row shows the variable's name, type, and value.
Step 15 Reopen the command to confirm the settings are saved, then close it with the X.
Step 16 To make the result visible, collapse Variables, expand Advanced, and scroll to PromptMe. Drag it after Set Variable. This supporting command displays the stored text; it does not create our String variable.
Step 17 Open PromptMe. Keep Standard mode and enter s1 in Header. PromptMe recognizes this defined String name and displays its current value, rather than the name itself.
Step 18 Click the plus to add a button. Set its caption to Done. Enter b1 for its Boolean output. That flag records which button was pressed; it does not change s1. Now tap OK.
Step 19 Our script sets s1 to Hello ScriptTap, then reads s1 for the prompt header. The second command makes the stored value visible.
Step 20 Close the editor to return to the home screen.
Step 21 When the script is complete, simply use the Play button in the main overlay.
Step 22 The header now says Hello ScriptTap, the value assigned by our script. Later commands can use the same String for messages, text typing, or transformations.
Step 23 Press Done. The script finishes automatically. Use the stored value in later commands whenever your script needs to reuse information.
Array mode declares a typed letter family for indexed values. Continue the script created in Single Variables; keep its existing PromptMe confirmation.
Open the first SetVariable and switch Single to Array. Keep String and enter only s in String Array. Indexed values use names such as s1 and s2. Letter case is ignored, and the entire visible letter family shares one type and scope.
Capacity accepts a 1–4096 Integer literal or an earlier Integer variable. Set it to 3 for the displayed s1–s3 range. Counts are not separate variable declarations or per-slot type boundaries. An ordinary String array is declaration-only: it does not fill its slots. Missing String values read as empty text.
Keep This Script Only and save. Expand Variables, scroll the palette if necessary, and manually drag a second SetVariable between the declaration and PromptMe. Keep Single, choose String, name its destination s1, and enter First slot. This assignment supplies the text; it does not fill the other positions.
Check the existing PromptMe header s1 and Done button output b1, then close settings unchanged. The script declares the family, writes one value, and displays it in that order. Range-writing commands can populate larger collections without one assignment per position.
Close the editor and use Play. PromptMe shows First slot. Press Done to finish automatically.
Arrays
Step-by-step guide
Step 01 Set Variable's Array mode declares a typed letter family for indexed values. Later commands can work with individual positions or ranges. We will continue the Single example and display one String value.
Step 02 Open the first Set Variable command. Switch Single to Array.
Step 03 Keep String for text. Integer, Decimal, Boolean, Hex, and Time are also available. Every slot using the same letter in this scope shares one type.
Step 04 Enter just the letter s for the String family. Its indexed positions are named s1, s2, and so on. Letters ignore case.
Step 05 Capacity accepts an Integer from one to four thousand ninety-six, or an Integer variable defined earlier. We will enter three. This does not create filled values or give individual positions separate types.
Step 06 Use In chooses This Script Only or Script Thread. Keep This Script Only, matching the commands in this example.
Step 07 Tap OK. The row shows s1 through s3. An ordinary String array is declaration-only: it does not fill its positions. An unwritten String reads as empty text.
Step 08 To make a value visible, expand Variables and scroll the palette upward if needed. Drag a second Set Variable between the declaration and PromptMe. Watch the insertion line before releasing.
Step 09 Open the new command. Keep Single mode and choose String so its type matches the s family.
Step 10 Set the name to s1, the first indexed position. Keep the same local scope.
Step 11 Enter First slot as its value, then tap OK. This assignment writes s1; it does not fill the other positions.
Step 12 The existing PromptMe reads s1 in its header. Its Done button writes b1 only as confirmation. Check these settings, then close with the X without changing them.
Step 13 The first command declares the typed family. The second writes one value, and the third displays it. Range-writing commands can fill larger collections without a separate assignment for each position.
Step 14 Close the editor to return to the home screen.
Step 15 When the script is complete, simply use the Play button in the main overlay.
Step 16 PromptMe displays First slot, the text written to s1 after the family was declared. The array declaration itself did not supply that text.
Step 17 Press Done to finish automatically. Declare the matching type and scope before later commands use an indexed collection.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
This introduction builds a fresh three-command script with genuine palette drags: SetVariable stores Current Time in local t1; Display reads t1 in an area away from the main overlay for five seconds; PromptMe shows Time Set with one Done button using Boolean b1. The actual displayed clock value comes from this run. Its 24-hour readout is normal for a Time value. The follow-up tabs reuse this script.
Current Time
Step-by-step guide
Step 01 Time Generator lets Set Variable store a clock reading or a Unix timestamp for later commands. Use Current samples when the script reaches this command, not when you edit it. We will display that real result.
Step 02 Open Scripts from the main overlay. Choose New Script, then Blank Script.
Step 03 Find the new script in the library. Open its menu and choose Rename.
Step 04 Pick a name for your script, then save it.
Step 05 Select the new script, close the library, and open the editor. Minimize the main overlay to leave room for editing.
Step 06 Find Set Variable under Variables and drag it into the script. Then open the new command.
Step 07 Keep Single and choose Time as the Variable Type. The Time Generator control appears for this type.
Step 08 Switch Literal to Time Generator. This reveals separate choices for the format and the source.
Step 09 AM/PM Format uses a Time variable. Unix Time uses Decimal epoch seconds. We will keep AM/PM here; the Unix tabs show the other format.
Step 10 Switch Set Manually to Use Current. The clock fields disappear because Play will supply the value. This is one snapshot, not a continuously ticking timer.
Step 11 Enter t one as the destination. The letter t is a naming convention; the selected Variable Type determines what is stored.
Step 12 Use In selects This Script Only or Script Thread. Keep This Script Only for this example, and use the same scope in commands that read the result.
Step 13 Save the command. No manual time is stored in Use Current mode.
Step 14 Now drag Display below Set Variable. This supporting command makes the stored time visible instead of leaving it only in a variable.
Step 15 Choose Variable as the text source and enter t one.
Step 16 Choose an area away from the main overlay. Use the Area label to enter left one hundred, top three hundred, right four hundred forty, and bottom six hundred.
Step 17 Set Lifespan to five thousand milliseconds, then save. The real time value will stay visible for five seconds.
Step 18 Finally, drag Prompt Me below Display. It provides a clear confirmation that the script reached the end.
Step 19 Use Time Set as the prompt header.
Step 20 Add one Done button and use b one for its Boolean output. Save the prompt.
Step 21 Set Variable samples the clock, Display shows t one, and Prompt Me confirms completion. Each supporting command has a visible purpose.
Step 22 Close the editor and expand the main overlay.
Step 23 When the script is complete, simply use the Play button in the main overlay.
Step 24 Display shows the time sampled when Set Variable ran. It is a Time value; the twenty-four-hour readout here is normal.
Step 25 The Time Set prompt confirms completion. Tap Done to finish.
Step 26 Use Current Time when later commands need a clock reading from that point in the script. The other Time Generator tabs reuse this small example.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
Continue from the Current Time introduction. Change the generator to Time Array t, Capacity 3, keeping AM/PM Format and Use Current. Display reads t3, the final position. The run initializes t1, t2 and t3 from one shared clock sample; no ArraySet command is required.
Current Time Array
Step-by-step guide
Step 01 Time Generator can initialize an entire array from one clock sample. Unlike ordinary Set Variable Array mode, it fills the positions as well as declaring them. We will reuse the script from the Time Intro.
Step 02 Switch Single to Array. The destination name clears, and the array letter and Capacity controls appear.
Step 03 Enter t as the Time Array letter. Keep AM/PM Format, Use Current, and This Script Only.
Step 04 Set Capacity to three. This field accepts a whole number from one through four thousand ninety-six, or a prior Integer variable.
Step 05 Save. All three positions will receive the same time, sampled once when this command runs.
Step 06 Open Display and change its variable to t three. Reading the last position makes the array initialization visible.
Step 07 The script now initializes t one through t three, displays t three, and confirms completion. No Array Set command is needed for this generator.
Step 08 Close the editor and expand the main overlay.
Step 09 When the script is complete, simply use the Play button in the main overlay.
Step 10 Display shows the time stored in t three. The generator gave all three positions the same clock reading.
Step 11 The Time Set prompt confirms completion. Tap Done to finish.
Step 12 Use a Time Generator array when a group of positions should start with one consistent time sample.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
Choose Single, Unix Time and Set Manually. Store the Decimal literal 1000.125 in local d1; the fraction represents 125 milliseconds. Display shows that exact supplied value. This mode stores epoch seconds; it does not convert a written date or clock into a timestamp. The value field also accepts a prior Decimal variable, demonstrated in the Manual Array tab.
Unix Time — Manual
Step-by-step guide
Step 01 Manual Unix Time stores an epoch-seconds value you provide. Unix time counts seconds from January first, nineteen seventy, in UTC. Fractions represent parts of a second. We will display a fixed example using the same small script.
Step 02 Choose Single for one destination.
Step 03 Switch the format to Unix Time. Variable Type changes to Decimal automatically.
Step 04 Choose Set Manually. This reveals the Decimal value field. Changing the source clears the previous value.
Step 05 Enter d one as the destination variable.
Step 06 Enter one thousand point one two five. The fraction means one hundred twenty-five milliseconds. This mode stores epoch seconds; it does not convert a written date or a clock into a timestamp.
Step 07 The same field can read a prior Decimal variable instead of a literal number. The Manual Array tab demonstrates that option. Keep This Script Only and save.
Step 08 Change Display to read d one, then save it.
Step 09 Set Variable stores the supplied Decimal, Display reads d one, and Prompt Me 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 one thousand point one two five, exactly the epoch-seconds value we supplied.
Step 13 The Time Set prompt confirms completion. Tap Done to finish.
Step 14 Use Manual Unix Time when you already have a timestamp to store or copy. Use Current when Play should supply the timestamp instead.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
Keep the first command as a real source: it writes 1000.125 into Decimal d1. Drag another SetVariable between it and Display. The new generator uses Unix Time, Set Manually, Decimal Array u, Capacity 3 and source d1. Source and destination use local scope. Display reads u3 and shows 1000.125; all three positions receive the same resolved Decimal value. The four-command script is the shortest version that also demonstrates a prior-variable source and visible confirmation.
Unix Time — Manual Array
Step-by-step guide
Step 01 A Manual Unix Time array fills its positions from one supplied Decimal value. The source can be a literal number or a previously written Decimal variable. This example demonstrates the variable source.
Step 02 Keep the first command. It writes our known example into d one before the array generator runs. This supporting step provides a real source to copy.
Step 03 Drag another Set Variable between that command and Display, then open it.
Step 04 Choose Time to reveal Time Generator. Enable it, then choose Unix Time. The value type becomes Decimal.
Step 05 Choose Array and enter u as the Decimal Array letter. Keep This Script Only.
Step 06 Keep Set Manually and enter d one in the Decimal field. Here, d one means read that prior variable, not store the letters as text.
Step 07 Set Capacity to three. Use an Integer literal or prior Integer variable from one through four thousand ninety-six.
Step 08 Save the generator. It will initialize u one through u three with the value read from d one.
Step 09 Change Display to read u three. This shows that the generator reached the last position.
Step 10 The four commands supply d one, initialize the array, display u three, and confirm completion. Source and destination use the same Decimal type and local scope.
Step 11 Close the editor and expand the main overlay.
Step 12 When the script is complete, simply use the Play button in the main overlay.
Step 13 Display shows one thousand point one two five from u three. All three array positions received the same resolved value from d one.
Step 14 The Time Set prompt confirms completion. Tap Done to finish.
Step 15 Use this form to give a batch of Decimal positions the same existing timestamp. Ordinary Array mode only declares storage; a Time Generator also initializes it.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
Remove the first supporting manual-source command from the demonstration script: Use Current does not need a prior value to copy. Change the remaining generator to Single, Unix Time, Use Current and Decimal destination d1. Display reads d1 for five seconds before Time Set/Done. The actual timestamp includes millisecond precision and stays fixed during Display; the next run samples a new timestamp.
Unix Time — Current
Step-by-step guide
Step 01 Current Unix Time stores a numeric timestamp when Play reaches the command. It counts seconds from January first, nineteen seventy, in UTC, with millisecond precision. Later commands can use that Decimal value for comparisons or calculations.
Step 02 Remove the first manual source command. Current mode does not need a prior value to copy.
Step 03 Open the remaining Time Generator command.
Step 04 Choose Single for one timestamp.
Step 05 Keep Unix Time and select Use Current. The manual value field disappears, and its old source is cleared.
Step 06 Enter d one as the Decimal destination. Keep This Script Only and save.
Step 07 Change Display from u three to d one, then save.
Step 08 The script now samples a timestamp, displays it for five seconds, and confirms completion. No manual source command is required.
Step 09 Close the editor and expand the main overlay.
Step 10 When the script is complete, simply use the Play button in the main overlay.
Step 11 Display shows the timestamp sampled during this run. Its fractional part represents milliseconds. It is one stored snapshot, not a timer that keeps counting.
Step 12 The Time Set prompt confirms completion. Tap Done to finish.
Step 13 Use Current Unix Time to mark when an event occurs in your script. Running the script again samples a new timestamp.
Time Generator lets SetVariable store a clock reading or Unix timestamp for later commands. Choose Time as Variable Type to reveal the generator control. AM/PM Format stores a Time value; Unix Time changes the type to Decimal and uses epoch seconds from 1 January 1970 UTC. Use Current samples once when Play reaches the command, not while editing and not continuously.
Single writes one named variable. Array uses a letter and a Capacity from 1 through 4096, supplied as an Integer literal or prior Integer variable. Unlike ordinary Array declaration, a Time Generator array initializes every position with the same resolved value. This Script Only is local; Script Thread uses the calling thread scope. Match the scope and type in later readers. Changing the generator format, source or destination mode clears settings that no longer apply; check the completed form before saving.
Continue from Current Unix Time. Change the generator to Decimal Array d, Capacity 3, with Time Generator, Unix Time and Use Current enabled. Display reads d3. The live run gives d1, d2 and d3 the same epoch-seconds sample, including milliseconds. It does not sample separately for each position.
Unix Time — Current Array
Step-by-step guide
Step 01 Current Unix Time can initialize a Decimal array with one shared timestamp. The clock is sampled once for the command, not separately for every position. This keeps the batch consistent.
Step 02 Switch Single to Array and enter d as the Decimal Array letter.
Step 03 Set Capacity to three. An Integer literal or prior Integer variable can select the capacity, from one through four thousand ninety-six.
Step 04 Keep Time Generator, Unix Time, Use Current, and This Script Only. No manual value is needed.
Step 05 Save. The command will declare and initialize d one through d three with the same Decimal timestamp.
Step 06 Change Display to read d three and save. The last position will show the initialized timestamp.
Step 07 The generator initializes all three positions before Display reads d three. Prompt Me remains the final confirmation.
Step 08 Close the editor and expand the main overlay.
Step 09 When the script is complete, simply use the Play button in the main overlay.
Step 10 Display shows the timestamp in d three. All three positions received the same epoch-seconds value, including its milliseconds.
Step 11 The Time Set prompt confirms completion. Tap Done to finish.
Step 12 Use a Current Unix Time array when several positions should share the timestamp from one point in the script.
Single · AM/PM Format · Set Manually stores one Time value for later commands. It does not change the device clock or pause playback.
The prepared first step creates t1 as 2026-10-26 09:30. String s1 contains &t2; Standard PromptMe uses Header s1 and a Done button writing b2. These helpers display the real output. The Single guide explains the basic display pattern.
Manually drag SetVariable from Variables, and place it after t1 but before the display steps. Keep Single, choose type Time, enable Time Generator, and keep AM/PM Format, Set Manually and This Script Only. Name the destination t2.
Clock uses separate numeric Hours, Minutes, Seconds and AM/PM controls. Enter 09, 30, 00 and AM. Save and use Main Overlay Play. The real result is 09:30, a Time value displayed in 24-hour form. Press Done.
Reopen the command and switch to Whole Time. Enter t1, an earlier Time variable. Do not put its name in a numeric Clock field, or use the Current Time token for this manual source. Switching Clock → Whole Time → Clock retains their independent editor drafts; only the selected source is saved. Play again: t2 contains the complete 2026-10-26 09:30, including its date.
Whole Time also accepts a literal in HH:mm[:ss] form, optionally preceded by YYYY-MM-DD and a space or T. Replace t1 with 2026-10-27 14:45:30. This whole-value syntax uses 24-hour time and no AM/PM suffix. A third real Play displays the full date and seconds. Press Done.
Keep the destination scope consistent with later consumers. Use Manual · Array for multiple initialized entries, or the separate Current Time and Unix tabs for those sources and formats.
AM/PM · Manual · Single
Step-by-step guide
Step 01 SetVariable can store a fixed time, or copy an earlier Time variable, for later commands to use. This guide covers Single, AM/PM Format, and Set Manually. It sets a value; it does not change the device clock or make the script wait.
Step 02 The first prepared step stores a dated time in t1. The String step displays t2, and PromptMe shows that string with a Done button. These supporting steps make each real result visible. The basic Single guide explains the display pattern.
Step 03 Drag SetVariable from the command palette into the script. Place it after t1 and before the display steps, so it creates t2 before the String reads it.
Step 04 Open the new command. Keep Single, select the Time type, and enable Time Generator. Leave AM/PM Format and Set Manually selected. Current Time and Unix Format have their own guides. This example uses This Script Only.
Step 05 Name the destination t2. In Clock entry, set nine hours, thirty minutes, zero seconds, and AM. The separate fields are for clock numbers; a variable name or a full date belongs in Whole Time instead.
Step 06 Save the command. When the script is complete, simply use the Play button in the main overlay.
Step 07 PromptMe shows nine thirty. The result is a Time value, displayed in twenty-four-hour form as zero nine colon thirty. AM/PM is the entry format, not an extra suffix added to the stored value. Press Done.
Step 08 Reopen the command and switch Clock to Whole Time. Enter t1 to copy the Time value created earlier in this script. Use a prior Time variable, not its name in the Hours field, and not the Current Time token in this manual source.
Step 09 Clock and Whole Time keep separate drafts while this editor is open. Switch back to see the clock numbers, then return to t1. These are two ways to enter one manual source. Only the selected entry is saved.
Step 10 Save and play again. The earlier t1 step runs first, then this command copies its complete Time value into t2.
Step 11 The displayed result includes the date as well as nine thirty. It matches t1, showing that Whole Time accepts an earlier Time variable without discarding its date. Press Done.
Step 12 Whole Time also accepts a dated literal. Replace t1 with year-month-day, a space, and fourteen forty-five thirty. Use twenty-four-hour time here, with optional seconds. Do not add an AM or PM suffix to this whole-value syntax.
Step 13 Save and play once more to check the dated literal with the same display steps.
Step 14 PromptMe displays the complete date and fourteen forty-five thirty from t2. Press Done. Choose Clock for separate numeric fields, or Whole Time for a complete literal or an earlier Time variable.
Step 15 Use the stored Time value in later comparisons or commands that accept Time. Keep its scope consistent with those consumers. See the Array guide to initialize several Time entries from the same manual source.
Array · AM/PM Format · Set Manually initializes several Time entries from one source. Use numbered entries under one array letter when later commands need a collection of values.
The prepared source t1 contains 2026-10-26 09:30. Two String/PromptMe pairs display 1=&v1 and 2=&v2 separately in full-width headers. Done buttons write b2 and b3. These helpers display actual values without truncating a date or seconds.
Manually drag SetVariable from the Variables palette, then move it after t1 and before both display pairs. Open it, choose Array, type Time, Time Generator, AM/PM Format and Set Manually. Use This Script Only consistently.
Enter just array letter v, not v1. Capacity 2 creates v1 and v2. Capacity accepts 1–4096 or an earlier Integer variable. Every slot is initialized from the same selected source; capacity is not a list of independent times.
Clock provides separate numeric fields. For this example switch to Whole Time and enter prior Time variable t1. A Time variable or complete literal belongs in Whole Time, not a numeric Clock field. Save and use Main Overlay Play. The first header shows 1=2026-10-26 09:30. Done advances to 2=2026-10-26 09:30; Done finishes the run.
Reopen the array command and replace t1 with 2026-10-27 14:45:30. Whole Time accepts HH:mm[:ss], optionally preceded by YYYY-MM-DD and a space or T. Use 24-hour time and no AM/PM suffix. Save and Play again. Both genuine headers display the complete new date, time and seconds, confirming that both slots were initialized.
Use the Manual · Single tab for separate Clock-field entry and editor-draft retention. Other tabs cover Current Time and Unix formats. Later commands can read numbered entries individually or process the array.
AM/PM · Manual · Array
Step-by-step guide
Step 01 Array mode initializes several typed entries from one source. Here, SetVariable fills two Time entries using AM/PM Format and Set Manually. Use an array when later commands need numbered values under one array letter.
Step 02 The first prepared step creates dated Time variable t1. Two String and PromptMe pairs display v1 and v2 separately, with a Done button after each. These helpers only display results; the new SetVariable command will initialize the array.
Step 03 Drag SetVariable into the script and place it after t1, before both display pairs. The source must exist before the array reads it, and the array must exist before its entries are displayed.
Step 04 Open the command and switch Single to Array. Choose Time, enable Time Generator, and keep AM/PM Format with Set Manually. Leave Use In set to This Script Only for this example.
Step 05 Enter just the array letter v, not v1. Set Capacity to two, creating v1 and v2. Capacity can be from one through four thousand ninety-six, or come from an earlier Integer variable. Every entry is initialized from the same source; capacity is not a list of different times.
Step 06 Clock offers separate numeric time fields. Switch to Whole Time and enter t1 to use its complete dated value. An earlier Time variable or a full time literal belongs here, not in a numeric Clock field.
Step 07 Save the command. When the script is complete, simply use the Play button in the main overlay.
Step 08 The first prompt shows entry one, v1, with the date and nine thirty copied from t1. Press Done to reveal the second entry.
Step 09 Entry two, v2, contains the same complete Time value. This confirms that both slots were initialized. Press Done to finish this run.
Step 10 Now reopen the array command and replace t1 with a dated literal: year-month-day, a space, and fourteen forty-five thirty. Whole Time uses twenty-four-hour syntax, with optional seconds and no AM or PM suffix.
Step 11 Save and play again. The same single source will initialize both entries in the array.
Step 12 Entry one now shows the full dated literal, including seconds. Press Done to inspect entry two.
Step 13 Entry two shows that same date and time. Press Done. Later commands can read v1 and v2 individually, or process the array as a collection.
Step 14 Choose Single for one named Time variable, and Array to initialize multiple typed entries. Use the separate Current Time and Unix guides when those sources or formats fit your script instead.