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...") |
|||
(5 intermediate revisions by 2 users 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;"> | ||
− | + | If you already have an existing dictionary, this function will write to the root of the dictionary. | |
− | |||
</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 | + | You can choose to add a Key manually. |
− | |||
</pre><br> | </pre><br> | ||
− | * ''''' Define | + | * ''''' Define manually ''''' |
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | ||
− | + | 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] | |
</pre><br> | </pre><br> | ||
Line 39: | Line 37: | ||
* ''''' Exclude view ids without text ''''' | * ''''' Exclude view ids without text ''''' | ||
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | ||
− | All the obtained will be saved | + | All the obtained will be saved excluding values without any text content. |
</pre><br> | </pre><br> | ||
Line 45: | Line 43: | ||
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | ||
− | + | All views will be obtained regardless of containing any text or not. | |
e.g. | e.g. | ||
− | An ID that | + | An ID for a view that has no text: |
− | Key = android: id/content | + | Key = android:id/content |
Value = | Value = | ||
− | + | An ID for a view with text content: | |
Key = com.arlosoft.macrodroid:id/title | Key = com.arlosoft.macrodroid:id/title | ||
Value = Add macro | Value = Add macro | ||
</pre><br> | </pre><br> | ||
− | |||
=== Overlay === | === Overlay === | ||
Line 65: | Line 62: | ||
* ''''' Exclude Overlay ''''' | * ''''' Exclude Overlay ''''' | ||
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | ||
− | + | Only views from the main foreground application will be acquired, any app showing an overlay will be ignored. | |
</pre><br> | </pre><br> | ||
Line 71: | Line 68: | ||
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | ||
− | + | Attempts to obtain all views that are visible on screen including the foreground app and any overlays. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | An overlay is typically a floating window displayed above the main screen. For example MacroDroid uses overkays to display floating text items. | |
− | |||
− | |||
</pre><br> | </pre><br> |
Latest revision as of 06:31, 25 January 2025
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.
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 manually
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 excluding values without any text content.
- Include view ids without text
All views will be obtained regardless of containing any text or not. e.g. An ID for a view that has no text: Key = android:id/content Value = An ID for a view with text content: Key = com.arlosoft.macrodroid:id/title Value = Add macro
Overlay
- Exclude Overlay
Only views from the main foreground application will be acquired, any app showing an overlay will be ignored.
- Include Overlay (Pro version required)
Attempts to obtain all views that are visible on screen including the foreground app and any overlays. An overlay is typically a floating window displayed above the main screen. For example MacroDroid uses overkays to display floating text items.