| Line 1: |
Line 1: |
| − | <span style="color: #0E9549; font-size: 24px;">'''About this constraint '''</span> | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on how the macro was invoked.</pre> |
| | | | |
| − | This constraint can be used to allow/prevent functionality based on what caused the macro to be invoked. For example, if it was invoked from the MacroDroid Drawer or as a result of a user selecting an option within an Option Dialog.
| + | ''' Options ''' |
| | | | |
| − | This constraint should be used on individual triggers and actions (or within IF conditions) and it should not be applied at the whole macro level.
| + | * '''Invoked by / Not invoked by''' - Choose whether to match or exclude selected methods |
| | + | * '''Methods''' - Select one or more invocation sources: |
| | + | ** '''Animation Overlay''' |
| | + | ** '''Custom Scene''' |
| | + | ** '''Floating Button''' |
| | + | ** '''Floating Text Click''' |
| | + | ** '''Google Assistant''' |
| | + | ** '''Macro Run Action''' |
| | + | ** '''MacroDroid Drawer''' |
| | + | ** '''Notification''' |
| | + | ** '''Option Dialog''' |
| | + | ** '''Other Standard Trigger''' |
| | + | ** '''Overlay Bar''' |
| | + | ** '''Power Menu''' |
| | + | ** '''Quick Run Tile''' |
| | + | ** '''Shortcut''' |
| | + | ** '''Test Actions''' |
| | + | ** '''Test Macro''' |
| | + | |
| | + | ''' Example ''' |
| | + | |
| | + | ''Example 1: Set a variable to a different value based on how the macro was invoked'' |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Empty Trigger |
| | + | </pre> |
| | + | <pre class="action-style">Actions |
| | + | If (Macro Invoked by FloatingTextClick) |
| | + | Set Variable: count = 10 |
| | + | ELSE |
| | + | Set Variable: count = 100 |
| | + | ENDIF |
| | + | </pre> |
| | + | |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Constraint: Trigger Fired|Trigger Fired Constraint]] |