Difference between revisions of "Constraint: MacroDroid Invocation Method"
| Line 1: | Line 1: | ||
| − | < | + | <pre class="header-style">This constraint allows or prevents a macro/feature from running based on how the macro was invoked.</pre> |
| − | + | ''' Options ''' | |
| − | + | * '''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]] | ||
Latest revision as of 13:13, 9 January 2026
This constraint allows or prevents a macro/feature from running based on how the macro was invoked.
Options
- 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
Triggers Empty Trigger
Actions If (Macro Invoked by FloatingTextClick) Set Variable: count = 10 ELSE Set Variable: count = 100 ENDIF
See Also