Difference between revisions of "Constraint: Clipboard content"

m
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">This constraint allows or prevents a macro/feature from running based on the current clipboard text.</pre>
This constraint can be used to allow a trigger to fire only when the contents of the clipboard match a specified text string.
+
 
</pre>
+
''' Options '''
<pre style="background-color: #FFFF99; color: #112A46; border-radius: 10px; padding: 10px;">
+
 
This constraint can only work on Android 10+ if you have used the clipboard refresh action previously to update the latest known clipboard text in MacroDroid.
+
* '''Text Match''' - Match specific text or patterns
</pre>
+
* '''Enable regular expression matching''' - Use regex for advanced matching
''See also: [[Action: Clipboard Refresh|Clipboard Refresh]].''
+
* '''Case insensitive''' - Ignore uppercase/lowercase differences when comparing text
 +
 
 +
''' Example '''
 +
 
 +
''Example 1: Share a copied URL only when the clipboard contains a link''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Widget Button</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Share Text</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
Clipboard content - Contains "http"</pre>
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger: Clipboard Change|Clipboard Change Trigger]]
 +
* [[Action: Share Text|Share Text Action]]

Latest revision as of 11:17, 9 January 2026

This constraint allows or prevents a macro/feature from running based on the current clipboard text.

Options

  • Text Match - Match specific text or patterns
  • Enable regular expression matching - Use regex for advanced matching
  • Case insensitive - Ignore uppercase/lowercase differences when comparing text

Example

Example 1: Share a copied URL only when the clipboard contains a link

Triggers

Widget Button
Actions

Share Text
Constraints

Clipboard content - Contains "http"

See Also