ScriptTap
OCR

Command video guide

OCR

OCR means optical character recognition. It turns text visible in an image into text a script can display or use in later commands. Read captures recognized text from a selected screen region; Find searches that region for matching text and can tap it. Both run on the device.

Create and name OCR Demo, manually drag OCR from Capture, and choose Read. This Script Only keeps output variables local; Script Thread shares them within that thread. Select the appropriate Text Script: Latin, Chinese, Devanagari, Japanese or Korean.

Use Area to select the complete ScriptTap launcher label, then save the region. If Android asks, allow screen capture. Double-tap the Area value to inspect exact top-left and bottom-right pixel coordinates; these fields also accept Integer variables written earlier in the script.

Set Text → s1. Under Save Outputs, enable Success → b1 and Error → s2. Success means recognition completed, and a successful read can be empty. It does not mean a particular word was found. Error text distinguishes capture or recognition problems from an empty result.

Use Test to confirm the selected region reads ScriptTap, then save. Manually drag PromptMe below OCR, keep Standard, set Header → s1, and add Done → b2. Keep Toggles & Text off. The prompt displays the recognized String rather than the literal variable token.

Close the editor and use Play. The prompt displays ScriptTap; choose Done to finish. Keep recognition regions focused, and test with the fonts and writing that the real script will encounter.

Read / OCR.read

Step-by-step guide

  1. Step 01

    O C R stands for optical character recognition. It converts text shown in an image into text the script can display or use in later commands. Read stores recognized text from a selected screen region in a String variable. Find locates specific text instead; it has a separate guide.

    OCR step 1: O C R stands for optical character recognition. It converts text shown in an image into text the script can display or use in later commands. Read stores recognized text from a selected screen region in a String variable. Find locates specific text instead; it has a separate guide.
  2. Step 02

    Open Scripts from the main menu and create a new blank script. We will keep existing scripts unchanged.

    OCR step 2: Open Scripts from the main menu and create a new blank script. We will keep existing scripts unchanged.
  3. Step 03

    Scroll to the new script and open its menu to rename it.

    OCR step 3: Scroll to the new script and open its menu to rename it.
  4. Step 04

    Give the example a name. We will use O C R Demo. Select it and open the script editor.

    OCR step 4: Give the example a name. We will use O C R Demo. Select it and open the script editor.
  5. Step 05

    Open Capture, then drag O C R into the live script. Double-tap the inserted command to open its settings.

    OCR step 5: Open Capture, then drag O C R into the live script. Double-tap the inserted command to open its settings.
  6. Step 06

    Switch to Read. This mode reads all recognized text inside one selected region; it does not search for a particular phrase.

    OCR step 6: Switch to Read. This mode reads all recognized text inside one selected region; it does not search for a particular phrase.
  7. Step 07

    Use In controls where the result variables are available. This Script Only keeps them local. Script Thread shares them within the thread. We will keep This Script Only.

    OCR step 7: Use In controls where the result variables are available. This Script Only keeps them local. Script Thread shares them within the thread. We will keep This Script Only.
  8. Step 08

    Choose the Text Script that matches the writing on screen. Latin, Chinese, Devanagari, Japanese, and Korean are available. We will use Latin for the ScriptTap label.

    OCR step 8: Choose the Text Script that matches the writing on screen. Latin, Chinese, Devanagari, Japanese, and Korean are available. We will use Latin for the ScriptTap label.
  9. Step 09

    Use the Area selector and resize the region around the ScriptTap label. Keep the text fully inside it. If Android asks, allow screen capture.

    OCR step 9: Use the Area selector and resize the region around the ScriptTap label. Keep the text fully inside it. If Android asks, allow screen capture.
  10. Step 10

    Double-tap the Area value for exact coordinates. These fields accept pixel numbers or Integer variables written earlier in the script. We will keep our selected region.

    OCR step 10: Double-tap the Area value for exact coordinates. These fields accept pixel numbers or Integer variables written earlier in the script. We will keep our selected region.
  11. Step 11

    Set Text to s1. This String variable will receive the recognized text for use by later commands.

    OCR step 11: Set Text to s1. This String variable will receive the recognized text for use by later commands.
  12. Step 12

    Save Outputs adds optional status information. Enable Success and use b1 for its Boolean value. Enable Error and use s2 for any error message.

    OCR step 12: Save Outputs adds optional status information. Enable Success and use b1 for its Boolean value. Enable Error and use s2 for any error message.
  13. Step 13

    Success means recognition completed, not that a particular word was found. A successful read can be empty. Error text helps distinguish a capture or recognition problem from an empty result.

    OCR step 13: Success means recognition completed, not that a particular word was found. A successful read can be empty. Error text helps distinguish a capture or recognition problem from an empty result.
  14. Step 14

    Use Test to check the selected region. Here it recognizes ScriptTap. This is a useful check before relying on the text in a longer script.

    OCR step 14: Use Test to check the selected region. Here it recognizes ScriptTap. This is a useful check before relying on the text in a longer script.
  15. Step 15

    Tap O K to save. Next, we will add a prompt so the recognized text has a clear visible result.

    OCR step 15: Tap O K to save. Next, we will add a prompt so the recognized text has a clear visible result.
  16. Step 16

    Drag PromptMe below O C R. This supporting command will display the String produced by Read.

    OCR step 16: Drag PromptMe below O C R. This supporting command will display the String produced by Read.
  17. Step 17

    Keep Standard and set Header to s1. Add a Done button with b2 as its Boolean output, then save. The header will use the String value, not the letters s one.

    OCR step 17: Keep Standard and set Header to s1. Add a Done button with b2 as its Boolean output, then save. The header will use the String value, not the letters s one.
  18. Step 18

    When the script is complete, simply use the Play button in the main overlay.

    OCR step 18: When the script is complete, simply use the Play button in the main overlay.
  19. Step 19

    The prompt shows ScriptTap. O C R read that from the screen and saved it in s1; PromptMe is only displaying the result. Choose Done to finish the script.

    OCR step 19: The prompt shows ScriptTap. O C R read that from the screen and saved it in s1; PromptMe is only displaying the result. Choose Done to finish the script.
  20. Step 20

    Recognition runs on the device, using only the selected area. Keep that area focused and test with the fonts and writing your script will encounter. Use the Find guide when you need to locate or tap specific text.

    OCR step 20: Recognition runs on the device, using only the selected area. Keep that area focused and test with the fonts and writing your script will encounter. Use the Find guide when you need to locate or tap specific text.