Command video guide
ColorClassify
ColorClassify turns stored Hex colors into useful numerical codes or text labels for later decisions. It does not read the screen itself. This Overview shows the current options without running a script. The demonstration tabs preserve the complete supporting setup and visible results.
Source Mode Single reads one prior Hex variable, not a literal color. Array reads a segment of a declared Hex array using one array letter, a one-based Start and Count. Use In chooses This Script Only or Script Thread for the result scope. Output Type is Integer, Decimal or String; Hex is not an output-type option. Single uses a scalar Output name. Array uses one Output Array letter and requires a previously declared array of that selected type.
Confidence is a literal whole number from 1 to 100; 100 requires an exact RGB match and lower values allow more channel difference. The fresh command starts at 90. It is not a screen-pixel coverage percentage. No Match is a fallback compatible with the selected output type.
Rows defines up to 16 targets. Each Color is a six-digit Hex literal or prior Hex variable; Result must match the selected output type. Name is optional. Plus adds a row and its red X removes it. Rows are checked in order: the first qualifying match wins, not the closest color. Hex Array instead scans an existing declared Hex target array from Start for Count slots. It skips missing or unwritten slots rather than treating them as black. Integer or Decimal returns the matched target's absolute slot index; String returns its normalized Hex color as text. A target Count of zero produces No Match.
Array source outputs begin at slot 1, aligned to offsets in the source range rather than absolute source indexes. Unwritten source slots leave corresponding output slots untouched without compaction. A written 000000 is a real black color; source Count zero writes nothing. Starts use 1–4096 and counts 0–4096, as literal integers or prior Integer variables. For Array source, complete ranges must fit declared capacities and the output array must accommodate the requested count. Invalid consumed colors, type or bounds can reject that command's whole Array output batch before publication. These array-batch guarantees must not be assumed for Single mode.
Changing Source Mode or Targets resets mode-specific fields; review the new required inputs afterward. This Overview closes its draft without Save or Play. For a complete working example, choose a demonstration tab.
Overview
Step-by-step guide
Step 01 Color Classify turns stored colors into useful numbers or labels, so later commands can make decisions using them. It does not read the screen itself. This overview explains the source and target options without running a script. The other tabs contain complete working examples.
Step 02 Under Advanced, drag Color Classify into the script, then open the new row. There is no separate Basic or Advanced mode inside this command.
Step 03 Source Mode has Single and Array options. Single reads one previously assigned Hex variable, entered in Source Hex. This is a variable name, not a literal color code. Set Variable or a screen-reading command can supply the color earlier in the script.
Step 04 Use In selects the scope for the result. This Script Only keeps it local. Script Thread shares it within the parent's call tree. Keep the variables and any declared arrays in the appropriate scope.
Step 05 Confidence controls how closely the source and target colors must match. Enter a whole number from one through one hundred. One hundred requires an exact R G B match. Lower values allow more difference. The new command starts at ninety; this is not a percentage of pixels found on the screen.
Step 06 Output Type can be Integer for whole-number codes, Decimal for fractional values, or String for text labels. With a Single source, Output names one destination variable of that type. The source color itself is not changed.
Step 07 No Match is the fallback result when no target qualifies. Use a value compatible with the selected output type. In Rows mode, every row's Result must use that same type too.
Step 08 Targets has two choices: Rows and Hex Array. Rows lets you define the colors and their results here. Color accepts a six-digit Hex color or a prior Hex variable. Result is the value to write when that color matches. Name is an optional label for readability.
Step 09 Use plus to add another target, up to sixteen rows. The red X removes an unwanted row. Targets are checked in order, and the first match wins. It does not search for the closest match, so order overlapping targets by which result should take priority.
Step 10 Hex Array uses colors already stored in a declared Hex array. Select it, then enter the array letter, a one-based Start, and a Count. Start and Count can be literal whole numbers or previously assigned Integer variables. Missing or unwritten target slots are skipped, not treated as black.
Step 11 With Hex Array targets, the result is automatic. Integer and Decimal return the matched target's actual array index. String returns the matched Hex color as text. The first qualifying target wins. If none qualifies, No Match is used; a target Count of zero also produces no match.
Step 12 Switch Source Mode to Array to classify several stored colors. Source Array is one declared Hex array letter. Start chooses its first slot and Count chooses how many slots to process. Output Array is one array letter, not a scalar variable name. Declare that array earlier with the selected Integer, Decimal or String type.
Step 13 Array results begin at output slot one, aligned with offsets in the selected source range. They do not retain the source's absolute indexes. An unwritten source slot leaves the corresponding output slot untouched without shifting later results. A source Count of zero writes nothing. A written black color is still a real color.
Step 14 Array source works with either Rows or Hex Array targets. Choose the combination you need. Source and target starts range from one to four thousand and ninety-six; counts range from zero to four thousand and ninety-six. For Array source, the complete selected ranges must fit their declared capacities, and the output array must hold the requested count.
Step 15 An invalid color, incompatible output type, or invalid range can reject an Array classification before any of that command's results are written. Check Run Logs when a result is missing. Changing a source or target mode also resets mode-specific fields, so review the required values after switching.
Step 16 This was an options tour, not a finished script. Close the draft without saving or pressing Play. Use the demonstration tabs to see the supporting assignments and a visible result. Choose the smallest setup that makes your color classifications useful.
ColorClassify turns stored Hex colors into useful codes or labels for later script decisions. It does not read the screen itself. This Intro demonstrates Single source / Rows targets.
Create and name a new blank script, then open the editor. If Android asks, allow screen capture. Manually drag SetVariable into it. Keep Single, choose Hex, and set h1=FF0000, the six-digit code for red. Keep This Script Only. A screen-reading command can supply the color in a real script; the fixed value makes this example predictable.
Under Advanced, drag ColorClassify after SetVariable and open its frame. Keep Source Mode Single and Source Hex h1: this input is a Hex variable, not a literal color. Array mode processes a declared Hex array segment. Use In keeps output local with This Script Only or shares it within the parent's call tree with Script Thread.
Set Confidence to 100 for an exact color match; lower values allow more RGB difference. The range is 1–100. Keep Output Type Integer, set Output i1, and No Match 0. Decimal supports fractional results and String supports labels. Every row Result and the No Match value must fit the selected type.
Keep Targets Rows. Set the first Color to FF0000, Result 1, optional Name Red. Use + for a second row: Color 0000FF, Result 2, Name Blue. Up to 16 rows are checked in order; the first matching color supplies its Result. Names are for readability, and a row's red X removes it. Hex Array instead looks up a declared target-color array. Tap OK.
Drag Display after ColorClassify. Keep Once, choose Variable i1, select a clear rectangle with the visual area selector, confirm the check mark, and set Lifespan 5000 ms. Leave appearance defaults unchanged and tap OK.
Drag PromptMe after Display. Keep the regular Standard prompt, Header Complete, and add a Done button with Boolean output b1. Keep Toggles & Text off. Tap OK, then close the editor.
Play the four-command script. The complete actual timed Display shows 1: red matched the first target and ColorClassify wrote its result to i1. Complete follows when Display closes. Press Done to finish automatically; natural completion leaves the permanent Play MainButton collapsed. The original h1=FF0000 remains unchanged.
Intro — Single / Rows
Step-by-step guide
Step 01 Color Classify turns a stored color into a useful number or label. Later commands can use that result to decide what to do. In this example, red will mean one and blue will mean two.
Step 02 Open the main menu, then Scripts.
Step 03 Create a new blank script.
Step 04 Find the new script at the bottom of the library.
Step 05 Open its options, choose Rename, and pick a descriptive name.
Step 06 Select the script and open the editor. Collapse the extra overlay controls if needed. If Android asks, allow screen capture.
Step 07 Expand Variables and drag Set Variable into the script. It will supply a known color for this example. Color Classify does not read the screen itself.
Step 08 Open the added frame, keep Single mode, and choose Hex as the type.
Step 09 Name the variable h1 and enter the six-digit Hex code for red. Keep This Script Only and tap OK. A screen-reading command could supply this color in a real script.
Step 10 Find Color Classify under Advanced and drag it after the assignment. Then open its frame.
Step 11 Keep Source Mode Single and enter h1 as Source Hex. This field takes a Hex variable, not a literal color. Array mode processes a declared Hex array segment. We will cover that workflow separately.
Step 12 Use In selects where the result is stored. This Script Only keeps it local; Script Thread shares it within the parent's call tree. Keep the local scope here.
Step 13 Set Confidence to one hundred for an exact color match. Lower values allow more difference between the source and target colors. The allowed range is one through one hundred.
Step 14 Choose Integer for numerical codes. Decimal is available for fractional values, and String for text labels. Each row's Result and the No Match value must match the selected output type.
Step 15 Set Output to i1. This variable receives the selected row's result. Set No Match to zero, which will be used if none of the target colors match.
Step 16 Keep Targets set to Rows to define the colors and their results here. Hex Array instead looks up colors stored in a declared array. We will cover that workflow separately.
Step 17 In the first row, enter red as the Color and one as the Result. Give it the optional name Red so the list is easier to read.
Step 18 Use the plus button to add a second row. Enter blue as the Color, two as the Result, and name it Blue.
Step 19 You can define up to sixteen target rows. They are checked in order, and the first color that matches supplies its Result. Names are for readability. The red X removes an unwanted row.
Step 20 Tap OK. Set Variable provides red, then Color Classify converts that color to our numerical code. Next, add a visible result and a completion check.
Step 21 Expand Device and drag Display after Color Classify. This supporting command lets us see the value stored in i1.
Step 22 Open Display, keep Once mode, choose Variable as the source, and enter i1.
Step 23 Open the area selector and resize the box to a clear area. Use the check mark to return.
Step 24 Set its lifespan to five thousand milliseconds, giving us five seconds to see the result. Keep the other settings at their defaults and tap OK.
Step 25 Drag Prompt Me after Display as a final confirmation. It shows that the script reached the next command.
Step 26 Keep the regular Standard prompt and give it the header Complete.
Step 27 Add a button named Done, using b1 for its Boolean output. Then tap OK.
Step 28 The four commands supply a Hex color, classify it, display the numerical result, and confirm completion. Close the editor.
Step 29 When the script is complete, simply use the Play button in the main overlay.
Step 30 Display shows one. The red Hex value matched our first target.
Step 31 Complete confirms that the script reached Prompt Me. Later commands could use i1 to choose an action instead of repeatedly comparing Hex color codes.
Step 32 Press Done. The script finishes automatically. Use Color Classify when stored colors need meaningful codes or labels, with explicit targets and a clear No Match result.
Hex Array targets let ColorClassify look up a stored Hex source in a prepared color list instead of fixed result rows. Continue the Intro's Color Classify Demo; keep h1=FF0000, Display i1 for 5000 ms, and PromptMe Complete / Done.
Open the editor and expand Variables. Scroll the palette to a convenient height. Manually drag another SetVariable into the live script, then move the new row between the original assignment and ColorClassify. Choose Array / Hex, letter e, capacity 3, and This Script Only. A declaration reserves capacity without filling its slots. Tap OK.
Drag another SetVariable after the declaration and before ColorClassify. Keep Single, choose Hex, name e2, and value FF0000. This compatible typed assignment fills the second slot; e1 and e3 remain unwritten. Tap OK.
Open ColorClassify. Keep Source Single h1, Confidence 100, Integer output i1, No Match 0, and local scope. Change Targets to Hex Array. Enter array e, Start 1, Count 3. Start and Count accept Integer values or variables; the full range must fit the declaration. Count zero searches no targets. Unwritten target slots are skipped.
The first matching target wins, scanning in ascending slot order. Integer and Decimal outputs contain its absolute target slot number, not a custom row Result. String output contains the matched normalized Hex color. No Match remains the typed fallback. The target array is not modified.
Tap OK and close the editor. Play the six-command script. The complete live Display shows 2, because red matched e2. Complete follows after Display closes. Press Done to finish automatically.
Single / Hex Array
Step-by-step guide
Step 01 Hex Array targets let Color Classify look up a source color in a list prepared earlier. This is useful when the colors come from variables instead of fixed rows. We'll continue the Intro script and keep the same red source.
Step 02 Open the editor. Keep the original assignment to h1, Display, and the completion prompt.
Step 03 Expand Variables and scroll the palette to a convenient height for dragging.
Step 04 Drag another Set Variable into the live script.
Step 05 Move the new frame between the original assignment and Color Classify. The target array must be declared before the lookup runs.
Step 06 Open the added frame, choose Array mode, and select Hex as its type.
Step 07 Use the array letter e and a capacity of three. Keep This Script Only and tap OK. A declaration reserves space; it does not fill the slots with colors.
Step 08 Drag one more Set Variable after that declaration and before Color Classify. This supporting assignment will fill just the second slot.
Step 09 Open it, keep Single mode, and choose Hex.
Step 10 Name it e2 and enter the red Hex code. This writes red into slot two of the declared Hex array. Slots one and three remain unwritten. Tap OK.
Step 11 Open Color Classify. Keep Source Mode Single, Source Hex h1, Confidence one hundred, Integer output i1, and No Match zero.
Step 12 Change Targets from Rows to Hex Array. The row list is replaced by array and range controls.
Step 13 Enter e as the Hex Array, Start one, and Count three. This searches all three reserved slots. Unwritten target slots are skipped, so e2 is our only candidate.
Step 14 Start and Count can use Integer values or Integer variables. The full range must fit the declared array. A Count of zero searches no targets.
Step 15 The first matching slot wins. Integer and Decimal outputs contain its absolute slot number, not a custom row result. String output contains the matched Hex color. The target array is not changed.
Step 16 Tap OK. The red source will match e2, so i1 will receive two. No Match zero remains the fallback when no target matches.
Step 17 The two added assignments declare the target array and fill its second slot. Color Classify does the lookup; Display and Prompt Me make the result and completion visible. Close the editor.
Step 18 When the script is complete, simply use the Play button in the main overlay.
Step 19 Display shows two: the absolute slot number of the matching red target.
Step 20 Complete confirms that the script reached Prompt Me. Later commands could use this slot number to select a corresponding action.
Step 21 Press Done. The script finishes automatically. Use Hex Array targets when a prepared color list should drive the lookup instead of fixed result rows.
Array source mode classifies a segment of stored Hex colors in one command. With Hex Array targets, each written source is compared with a prepared color list. This example adapts a separate copy of the Single / Hex Array setup; the original remains unchanged.
Change the first SetVariable to Array / Hex, letter h, capacity 3. Keep the second declaration as Hex array e, capacity 3. Change the third assignment from e2 to e3, keeping FF0000. Declarations reserve capacity without filling slots.
Manually drag another SetVariable before ColorClassify. Choose Array / Integer, letter i, capacity 3. Drag one more SetVariable after that declaration and before ColorClassify. Choose Single / Hex, name h2, value FF0000. Only source slot two and target slot three are written. Keep This Script Only throughout.
Open ColorClassify. Choose Source Mode Array, Source Array h, Start 1, Count 3, Confidence 100, Output Type Integer, Output Array i, No Match 0. Keep Targets Hex Array, array e, Start 1, Count 3. Exact RGB equality is required at 100 confidence. Targets are searched in ascending slot order, skipping unwritten slots; the first match wins, not the closest color.
Integer and Decimal outputs contain the matching target's absolute slot index. String outputs contain its normalized Hex text instead. A written source with no match receives the typed No Match fallback. Output slots align to offsets in the source range, beginning at output slot one. Gaps are not compacted. Here h2 maps to i2; its value 3 identifies e3, not output slot three. Neither color array is changed.
Starts and counts accept Integer values or previously assigned Integer variables. Keep both complete ranges within declared capacities, and provide an output array large enough for the source Count. Source Count zero writes nothing; target Count zero gives No Match for each written source.
Save ColorClassify. Set Display to variable i2, retaining the existing area, 5000 ms lifespan and default appearance. Close the editor and play the eight-command script. The real Display shows 3, then PromptMe Complete appears. Press Done to finish automatically.
Array / Hex Array
Step-by-step guide
Step 01 Array source mode classifies a list of stored Hex colors. With Hex Array targets, each result identifies a matching color in another prepared list. We'll adapt a separate copy of our Single example, keeping the original unchanged.
Step 02 Change the first Set Variable to Array, keep Hex, and use h with capacity three. This declares our source array without filling its slots. Keep This Script Only, then tap OK.
Step 03 Keep the second Hex array declaration, e, with capacity three. In the third assignment, change e2 to e3 and keep the red Hex value. Tap OK. The target color now occupies slot three; the other two target slots remain unwritten.
Step 04 Next we need a declared destination and one written source color. Expand Variables and bring Set Variable to a convenient height for dragging.
Step 05 Drag Set Variable before Color Classify. Open it and choose Array. Keep Integer, use letter i and capacity three, then tap OK. This is where the classification results will be stored.
Step 06 Drag another Set Variable after that declaration, still before Color Classify. Keep Single, select Hex, name it h2, and enter the same red Hex value. Tap OK. Only the second source slot is written.
Step 07 Open Color Classify and change Source Mode to Array. This replaces the single-source field with array and range controls.
Step 08 Enter h as Source Array, Start one, and Count three. The command will consider all three source positions. Unwritten source slots are skipped.
Step 09 Keep Confidence one hundred and Output Type Integer. Set Output Array to i and No Match to zero. All declarations and outputs use This Script Only.
Step 10 Keep Targets set to Hex Array. Scroll down and check e, Start one, Count three. Targets are searched in ascending slot order, skipping unwritten slots. The first match wins, not the closest color. At one hundred percent confidence, the RGB color must match exactly.
Step 11 Integer and Decimal results contain the matching target's absolute slot number. String results contain its normalized Hex color instead. A written source with no matching target receives No Match. Here the red color will match target e3, so the Integer result is three.
Step 12 The output position follows the source segment's offset, starting at output slot one. Gaps are not compacted. With Start one, h2 maps to i2. The value three identifies target e3; it does not mean the result belongs in i3.
Step 13 Start and Count accept Integer values or previously assigned Integer variables. Keep both complete ranges within their declared capacities, and make the output array large enough for the source Count. A zero source Count writes nothing. A zero target Count produces No Match for each written source.
Step 14 Tap OK. Color Classify will write three to i2 without changing either color array.
Step 15 Open Display and change Variable to i2 to show the result. Keep its existing area, five-second lifespan and default appearance. It is a supporting command so we can see what Color Classify produced. Then tap OK.
Step 16 The script declares both color arrays, fills one target and one source, classifies the source range, and displays the corresponding result. Prompt Me confirms completion. Close the editor.
Step 17 When the script is complete, simply use the Play button in the main overlay.
Step 18 Display shows three from i2: source h2 matched target e3.
Step 19 Complete confirms that the script reached Prompt Me. Later commands can use each written output slot to make a decision for its corresponding source position.
Step 20 Press Done. The script finishes automatically. Use Array source mode when a color list needs position-preserving classification, with explicit targets and a typed No Match result.
Array / Rows maps stored Hex colors to your own results. This example declares local source array h and String output array s, fills h2 with FF0000, classifies h1 through h3, then shows s2 using PromptMe.
Start is the first source index; Count is the number of positions to inspect. The source range and destination capacity must be valid. Unwritten source entries are skipped without compacting their offsets. This example writes Red to s2 and leaves the other output positions unwritten.
Rows are checked in order, and the first matching row supplies its Result. Name is optional identification, not output. Confidence controls permitted RGB channel variation; 100 requires an exact match. No Match supplies a fallback for written source colors that match no row. Array mode stages a valid batch before publishing and does not change the source colors.
Array / Rows
Step-by-step guide
Step 01 Color Classify can turn a list of stored Hex colors into useful labels for later commands. Array source mode processes a range, while Rows lets you assign a result to each target color. We will build a small example that labels a red source color and shows its result with Prompt Me.
Step 02 Create a blank script for this example. The supporting variables provide predictable input, so no screen capture or image asset is needed.
Step 03 Give the new script a name, then open its editor. Existing example scripts remain unchanged.
Step 04 Open Variables and drag Set Variable into the script. This first command will declare the array that holds our source colors.
Step 05 Choose Array and Hex. Use array letter h and capacity three, keeping This Script Only. This reserves three source positions without filling them. We will write just one position next. Tap OK.
Step 06 Drag another Set Variable after the first. Declare a String array, letter s, with capacity three and the same local scope. Color Classify needs this destination ready before it runs. Tap OK.
Step 07 Drag a third Set Variable. Use Single, choose Hex, and set h2 to FF0000, the red color in this example. Only source position two is written; h1 and h3 remain unwritten. Save the assignment.
Step 08 Open Advanced, find Color Classify, and drag it after the three variable commands. Open the row you placed. This is the command that converts our stored color into a label.
Step 09 Keep This Script Only and change Source Mode to Array. The single-color field is replaced by Source Array, Start, and Count controls.
Step 10 Enter h as Source Array, Start one, and Count three. Count is the number of positions to inspect, not the last index. The full range must fit the declared source capacity. Unwritten positions are skipped rather than treated as black colors.
Step 11 Set Confidence to one hundred for an exact RGB match. Choose Output Type String and Output Array s. Enter Unknown for No Match. That fallback is used for a written source color that matches none of the target rows; it does not fill an unwritten source position.
Step 12 Keep Targets set to Rows. In the target row, enter FF0000 for Color and Red for Result. The optional Name can also be Red; it identifies the row, while Result is the value actually written. Scroll the form as needed to reach these fields.
Step 13 Rows are checked in order, and the first matching row supplies its Result. This is not a closest-color search. More rows can map other colors to other labels. Higher Confidence is stricter; lower values allow more variation in the red, green, and blue channels.
Step 14 Output positions follow offsets in the source range, starting at output slot one. Gaps are not compacted. Our range starts at h1, so the written value in h2 maps to s2. The new output array keeps its other positions unwritten. Source colors are not changed.
Step 15 Start and Count can use Integer values or earlier Integer variables. Give the output array enough capacity for the complete Count. A valid source Count of zero writes nothing. Array mode validates and stages the batch before publishing, so an invalid range or failed batch does not leave a partial result.
Step 16 Tap OK to save Color Classify. The red value in h2 will match our row and write Red into s2. Now add a visible confirmation.
Step 17 Drag Prompt Me after Color Classify. This is a supporting command: it will show the resulting String and wait for us to finish the example.
Step 18 Keep Standard mode and the same local scope. Set Header to s2. Prompt Me resolves a String variable used as its header, so the prompt will show the label that Color Classify wrote into that position.
Step 19 Configure one button with caption Done and Boolean variable b1, with Use Buttons on. Leave Toggles and Text off, then tap OK. The button lets us dismiss the result and finish naturally.
Step 20 The five commands declare source and output arrays, fill h2, classify the range, and show s2 through Prompt Me. The featured command is Color Classify; the others make its input and output visible. Close the editor.
Step 21 When the script is complete, simply use the Play button in the main overlay.
Step 22 The prompt shows Red, read from s2. Source position two kept its corresponding output position; it was not shifted into the first empty slot. Later commands can use these labels to choose what to do for each source color.
Step 23 Press Done. The script finishes automatically. Use Array with Rows when a stored color range needs your own position-preserving labels, with explicit targets and a No Match fallback.