Difference between revisions of "Action: Read Screen Contents"

(Created page with "== About == <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> This action can be used to capture the contents of the current screen...")
 
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
 
* ''''' This Dictionary '''''
 
* ''''' This Dictionary '''''
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
You can support one or more IP addresses so that the webhook is only activated from specific IP addresses.
+
If you already have an existing dictionary, this function will write to the root of the dictionary.
It also supports magic text '...'
 
 
</pre><br>
 
</pre><br>
  
 
* ''''' Add key '''''
 
* ''''' Add key '''''
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
You can support one or more IP addresses so that the webhook is only activated from specific IP addresses.
+
You can choose to add a Key manually.
It also supports magic text '...'
 
 
</pre><br>
 
</pre><br>
  
 
* ''''' Define manualmente '''''
 
* ''''' Define manualmente '''''
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
You can support one or more IP addresses so that the webhook is only activated from specific IP addresses.
+
Define one or more dictionary keys manually using the full syntax. For example to address a dictionary storing data by years and months you could write [2022][May]
It also supports magic text '...'
+
To force an array type (rather than dictionary) prefix the index with_A_. For example to output a value in a 2d array you could write [A_3][A_10]
 
</pre><br>
 
</pre><br>
  
Line 78: Line 76:
 
* A floating window displayed above the main screen.
 
* A floating window displayed above the main screen.
 
* A dialog box that appears on the screen.
 
* A dialog box that appears on the screen.
</pre><br>
 
 
==<p><b>Example</b></p>==
 
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Floating button gets elements from the screen, you can later check it (in the variable) to find the ID to use in a UI interaction or simply get the associated text of the ID.
 
</pre><br>
 
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
 
Floating button | Screen content
 
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
 
Read Screen Content -> my_dict
 
</pre><br>
 
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
 
Constraints
 
 
 
</pre><br>
 
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
 
my_dict | 5 entries (This is a short example, but in practice the dictionary can have many more entries.)
 
 
com.android.systemui:id/mobile_type | 5G
 
com.spotify.music:id/civerart | Cover and open spotify
 
com.microsoft.emmx:id/title | Search
 
 
</pre><br>
 
</pre><br>

Latest revision as of 17:59, 29 January 2024

About

This action can be used to capture the contents of the current screen into a dictionary variable.
The variable will consist of a number of key-value pairs where the key is the Ul view id and the value is the textual content.
Note | that any existing entries in the dictionary will be cleared.


Configuration available

Select variable

You need to select or create a dictionary type variable to store the obtained screen content.

Variables | Dictionary

Select key

  • This Dictionary
If you already have an existing dictionary, this function will write to the root of the dictionary.


  • Add key
You can choose to add a Key manually.


  • Define manualmente
Define one or more dictionary keys manually using the full syntax. For example to address a dictionary storing data by years and months you could write [2022][May]
To force an array type (rather than dictionary) prefix the index with_A_. For example to output a value in a 2d array you could write [A_3][A_10]


View ID

  • Exclude view ids without text
All the obtained will be saved including empty values.


  • Include view ids without text
Only an ID containing a defined value is obtained.

e.g.

An ID that will not be included:

Key = android: id/content
Value =

A valid ID that will be included:

Key = com.arlosoft.macrodroid:id/title
Value = Add macro



Overlay

  • Exclude Overlay
All the obtained will be saved including empty values.


  • Include Overlay (Pro version required)
Only an ID containing a defined value is obtained.

Examples of an overlay.

* A pop-up menu that appears when a button is tapped.
* A floating window displayed above the main screen.
* A dialog box that appears on the screen.