Difference between revisions of "Trigger: Clipboard Change"

 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<span style="color: #B22A2A; font-size: 24px; display: inline-block; margin-top: 15px; margin-bottom: 0px;"><strong>About this trigger</strong></span>
This trigger requires additional configuration on Android 10 and above. This limitation is due to Google blocking clipboard access from background applications since Android 10.
 
  
Warning: It stopped working completely for android 13 and higher.
+
This trigger will fire when the value stored in the clipboard is updated.
  
When new text is copied, it is saved to the clipboard. This trigger will be activated when this event occurs.
+
Requires additional configuration on Android 10 and above. This limitation is due to Google blocking clipboard access from background applications since Android 10.
  
 +
<span style="color: #B22A2A; font-size: 24px; display: inline-block; margin-top: 15px; margin-bottom: 0px;"><strong>Supported configurations</strong></span>
  
The following magic text is available when this trigger fires.
+
=== Regular expression matching ===
  
[Clipboard] - the text in the clipboard.
+
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>
 
  
'''Example Usage'''<br/>
+
=== Case insensitive ===
If the clipboard receives the value containing code it will try to get the code from 4 to 10 digits and fill the clipboard only with the code.
 
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
  
Clipboard change (code)
+
It will ignore the use of upper and lower case in title and detail.
*Enable regular expression matching
 
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
Clipboard refresh
+
=== Use logcat (ADB Hack)===
Text manipulation [Extract text ([Clipboard] \d{4,10}
 
Fill clipboard [lv-code]
 
</pre><br>
 
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
 
Constrains
 
  
 
+
Standard clipboard access is not possible on Android 10+ unless you have a rooted device with appropriate Magisk modules. As a workaround MacroDroid can monitor the device's logcat output to try and detect when new content appears in the clipboard.
</pre><br>
 
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
 
 
SMS CODE [Var type - String]
 
</pre><br>
 

Latest revision as of 17:58, 23 April 2024

About this trigger

This trigger will fire when the value stored in the clipboard is updated.

Requires additional configuration on Android 10 and above. This limitation is due to Google blocking clipboard access from background applications since Android 10.

Supported configurations

Regular expression matching

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.

Case insensitive

It will ignore the use of upper and lower case in title and detail.

Use logcat (ADB Hack)

Standard clipboard access is not possible on Android 10+ unless you have a rooted device with appropriate Magisk modules. As a workaround MacroDroid can monitor the device's logcat output to try and detect when new content appears in the clipboard.