Support multiple text for screen content (Reduce battery drain)

malaysia

New member
"Currently, screen content only supports a single text element for each screen content trigger.

I am aware that it can handle multiple texts using regex, but it cannot trigger different actions for each text.

For instance, if the text "num1" is matched, it should display "YES," and if "num2" is matched, it should show "NO."

In such cases, I find myself needing to use multiple screen content triggers, like this:


Triggers:

  • Screen Content [num1]
  • Screen Content [num2]
Actions:

  • If [Trigger: Screen Content [num1]]
    • Popup Text "YES"
  • Else if [Trigger: Screen Content [num2]]
    • Popup Text "NO"

The problem arises when I have a bulk of different texts that need to be matched, each with a different action when matched. Creating multiple screen content triggers consumes a significant amount of RAM and, of course, drains the battery because each screen content trigger performs its own text scanning.

I'd like to suggest a solution:

  1. Create a single screen content function that can work with multiple texts. This way, if I have multiple texts for screen content, it would only require one screen content trigger.
  2. Alternatively, provide an option to combine all the texts from the screen content, so if I have three screen content elements, it would only perform text scanning once to detect all three words together, instead of scanning three times (once for each text).
  3. Add a screen content function in IF Statement so i can assign different action
    for each text. [I think this one is the most relevent solution]

    For example:
    Trigger:
    Screen content [regex:\b(?:word1|word2)\b

    Action:
    IF [Screen content] = "word1"
    -- Popup Text "word1 detected"
    IF [Screen content] = "word2"
    -- Popup Text "word2 detected"
☑️ Select this option to combine all screen content within this macro and perform a single text scan.

I want to express my gratitude for developing this powerful app; I truly love it!"
 
Last edited:

Endercraft

Moderator (& bug finder :D)
Logically every screen content trigger should use the same scan to compare. I have a few of them and I would haven't noticed by now. If it works the way you described then that's weird.
Creating multiple screen content triggers consumes a significant amount of RAM
I'm not sure about the RAM but I do know on certain screen the comparing of all the text itself can be draining. The scan is straightforward unless there are thousands of elements.
 

samer

Member
"Currently, screen content only supports a single text element for each screen content trigger.

I am aware that it can handle multiple texts using regex, but it cannot trigger different actions for each text.

For instance, if the text "num1" is matched, it should display "YES," and if "num2" is matched, it should show "NO."

In such cases, I find myself needing to use multiple screen content triggers, like this:


Triggers:

  • Screen Content [num1]
  • Screen Content [num2]
Actions:

  • If [Trigger: Screen Content [num1]]
    • Popup Text "YES"
  • Else if [Trigger: Screen Content [num2]]
    • Popup Text "NO"

The problem arises when I have a bulk of different texts that need to be matched, each with a different action when matched. Creating multiple screen content triggers consumes a significant amount of RAM and, of course, drains the battery because each screen content trigger performs its own text scanning.

I'd like to suggest a solution:

  1. Create a single screen content function that can work with multiple texts. This way, if I have multiple texts for screen content, it would only require one screen content trigger.
  2. Alternatively, provide an option to combine all the texts from the screen content, so if I have three screen content elements, it would only perform text scanning once to detect all three words together, instead of scanning three times (once for each text).
  3. Add a screen content function in IF Statement so i can assign different action
    for each text. [I think this one is the most relevent solution]

    For example:
    Trigger:
    Screen content [regex:\b(?:word1|word2)\b

    Action:
    IF [Screen content] = "word1"
    -- Popup Text "word1 detected"
    IF [Screen content] = "word2"
    -- Popup Text "word2 detected"
☑️ Select this option to combine all screen content within this macro and perform a single text scan.

I want to express my gratitude for developing this powerful app; I truly love it!"
You can write one content to the Screen Content Trigger, and then run the Read Screen Contents action to read all the contents at once.
 
Top