Changes

no edit summary
Line 1: Line 1: −
== About ==
+
<pre class="header-style">This trigger will fire when a click on specific textual content is detected within a chosen app. It allows you to automate actions based on user interactions with on-screen elements in any application.</pre>
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
This trigger will fire when a click on specific textual content is detected within a chosen app.
     −
Note:
+
''' Options '''
This trigger may not work in all cases as some screens/apps may have custom implementations that block click and/or long click detection.
  −
</pre>
  −
* ''When this trigger is present, you can use more [...]'' ''[https://macrodroidforum.com/wiki/index.php/Magic_text#UI_click magic text]''
     −
==<p><b>Available configuration</b></p>==
+
* '''Text to Match''': The text content to look for when a click occurs (supports Magic Text)
 +
* '''Application Selection''': Choose specific apps to monitor, or select all applications
 +
* '''Click Type''':
 +
** '''Click''': Trigger on standard (short) clicks
 +
** '''Long Click''': Trigger on long press/click actions
 +
* '''Enable Regex''': When enabled, the text pattern is treated as a regular expression
 +
* '''Ignore Case''': When enabled (and regex is disabled), matching is case-insensitive
 +
* '''Use Content Description''': Include accessibility content descriptions when matching text
    +
''' Wildcard Patterns '''
   −
===  All applications ===
+
If regex is not enabled, you can use wildcards:
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
* '''*''' - Matches zero or more characters (e.g., "Save*" matches "Save", "Save File", "Save As...")
You can use 'All applications' but it is more recommended to select only the applications where you want to monitor, it could be 1 or more selected applications.
+
* '''?''' - Matches zero or one character (e.g., "Option?" matches "Option" or "Options")
</pre>
     −
===  Click | Long click ===
+
''' Configuration '''
   −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
1. Enter the text to match for the clicked element
You can filter only by a simple click or a long click.
+
2. Select specific applications to monitor, or choose "All Applications" (selecting specific apps is recommended for better performance)
</pre>
+
3. Choose the click type (standard click or long click)
 +
4. Optionally enable regex for advanced pattern matching
 +
5. Configure case sensitivity as needed
   −
===  Text to match ===
+
''' Examples '''
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
You can filter only by a simple click or a long click.
  −
</pre>
     −
==<p><b>Regular expression/Wildcards</b></p>==
+
  <pre class="trigger-style">Triggers
   −
=== Regular expression matching ===
+
UI Click [Submit: MyBankingApp]</pre>
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
  <pre class="action-style">Actions
Regular expression matching (or regex matching) is a technique for finding patterns within text using a specialized syntax known as regular expressions. It's a powerful tool for text processing and pattern recognition.
  −
</pre>
  −
===  Wildcards ===
  −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
The referenced text field or variable supports the use of wildcards, you can use wildcards to specify values that match a variety of inputs.
     −
* Represents zero or more occurrences of the preceding character or group.
+
Vibrate: 100ms
? Represents zero or one occurrence of the preceding character or group.
+
Log Entry: Form submitted at [time]</pre>
For example, the regular expression ab*c will match:
     −
abc
+
''Provide haptic feedback and log when the Submit button is clicked in a banking app.''
abbc
  −
abbc
  −
abbbbc
     −
The regular expression ab?c will match:
+
----
abc
+
 
abC
+
  <pre class="trigger-style">Triggers
</pre>
+
 
 +
UI Click [Delete*: Gmail (Long Click)]</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Confirm Dialog: Are you sure you want to delete?
 +
    If Cancel: Cancel Actions</pre>
 +
 
 +
''Add confirmation dialog when long-clicking any delete button in Gmail.''
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger requires the UI Interaction Accessibility Service to be enabled.
 +
* Not all apps support click detection - some apps use custom implementations that block click and/or long click detection.
 +
* Selecting specific applications instead of "All Applications" improves performance and reduces battery consumption.
 +
* The trigger monitors the accessibility service for click events, so it works without modifying the target applications.
 +
* Content description text from accessibility labels can also be matched when the option is enabled.
 +
* Magic text variables are available when this trigger fires.
 +
* Non-launchable apps can be included when selecting applications by enabling the checkbox.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Screen_content|Screen Content Trigger]]
 +
* [[Action:_UI_Interaction|UI Interaction Action]]