| Line 1: |
Line 1: |
| − | <span style="color: #0E9549; font-size: 24px;">'''About this restriction '''</span> | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on the current clipboard text.</pre> |
| − | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | + | |
| − | This constraint can be used to allow a trigger to fire only when the contents of the clipboard match a specified text string.
| + | ''' Options ''' |
| − | </pre> | + | |
| − | <pre style="background-color: #FFFF99; color: #112A46; border-radius: 10px; padding: 10px;"> | + | * '''Text Match''' - Match specific text or patterns |
| − | 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.
| + | * '''Enable regular expression matching''' - Use regex for advanced matching |
| − | </pre> | + | * '''Case insensitive''' - Ignore uppercase/lowercase differences when comparing text |
| − | ''See also: [[Action: Clipboard Refresh|Clipboard Refresh]].'' | + | |
| | + | ''' 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]] |