Difference between revisions of "Trigger: Clipboard Change"

m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">
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.
+
This trigger will fire when the value stored in the clipboard is updated.
 +
</pre>
  
Warning: It stopped working completely for android 13 and higher.
+
Requires additional configuration on Android 10 and above. This limitation is due to Google blocking clipboard access from background applications since Android 10.
  
When new text is copied, it is saved to the clipboard. This trigger will be activated when this event occurs.
+
'''Configuration Options'''
 
 
 
 
The following magic text is available when this trigger fires.
 
 
 
[Clipboard] - the text in the clipboard.
 
</pre>
 
  
'''Example Usage'''<br/>
+
* Regular expression matching
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: red; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
  
Clipboard change (code)
+
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.
*Enable regular expression matching
 
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
Clipboard refresh
+
* Case insensitive
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
 
  
 +
It will ignore the use of upper and lower case in title and detail.
  
</pre><br>
+
* Use logcat (ADB Hack)
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
SMS CODE [Var type - String]
+
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>
 

Latest revision as of 09:31, 11 June 2024

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.

Configuration Options

  • 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.