| Line 1: |
Line 1: |
| − | ''''' An action is something your device can do when a macro runs. A macro must have at least one action to be valid.'''''
| + | <pre style="background-color: #FFFF99; color: #112A46; border-radius: 10px; padding: 10px;"> |
| | + | An action is something your device can do when a macro runs. |
| | + | A macro must have at least one action to be valid. |
| | + | </pre> |
| | | | |
| | === Synchronous vs asynchronous === | | === Synchronous vs asynchronous === |
| | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> | | <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> |
| − | Most of MacroDroid actions take a minuscule amount of time to execute. But some actions such as HTTP request or a shell script action can take a significant time to complete. Some of these actions have an option to "Block next action until complete" in their configuration GUI. If this option is enabled subsequent actions will wait until this action completes before continuing. If the option is disabled the action will run asynchronously while other actions continue.
| + | MacroDroid actions typically execute quickly, but certain actions like HTTP requests or shell scripts may take longer. To ensure that subsequent actions wait for these longer actions to complete before continuing, enable the 'Block next action until complete' option in the action's configuration GUI. Otherwise, the action will run asynchronously while other actions continue. |
| | | | |
| − | In conventional programming languages you would probably be able to pass a callback to call when the execution is complete to perform some other actions after the asynchronous action has completed (possibly even work with the data if the asynchronous action returned some), but because MacroDroid inner workings are rather arbitrary there is usually no such systematic option and you need to rely on different workarounds. | + | In traditional programming languages, you could pass a callback function to execute after the asynchronous action is complete. This allows you to perform additional actions or work with the data returned by the asynchronous action. However, MacroDroid's inner workings are arbitrary, so there is no systematic option for this. Instead, you must rely on different workarounds. |
| | </pre> | | </pre> |
| | | | |
| Line 33: |
Line 36: |
| | | | |
| | [[Action: Ambient Display|Ambient Display]] | | [[Action: Ambient Display|Ambient Display]] |
| | + | |
| | + | [[Action: Animation Overlay|Animation Overlay]] |
| | | | |
| | [[Action: Android Shortcut|Android Shortcut]] | | [[Action: Android Shortcut|Android Shortcut]] |
| Line 43: |
Line 48: |
| | | | |
| | [[Action: Authenticate User|Authenticate User]] | | [[Action: Authenticate User|Authenticate User]] |
| | + | |
| | + | [[Action: Array Manipulation|Array Manipulation]] |
| | | | |
| | [[Action: Autosync On/Off|Autosync On/Off]] | | [[Action: Autosync On/Off|Autosync On/Off]] |
| Line 64: |
Line 71: |
| | [[Action: Car Mode|Car Mode]] | | [[Action: Car Mode|Car Mode]] |
| | | | |
| − | [[Action: Check Text On Screen|Check Text To Screen]] | + | [[Action: Check Pixel Colour|Check pixel colour]] |
| | + | |
| | + | [[Action: Check Text In Screenshot|Check Text In Screenshot]] |
| | + | |
| | + | [[Action: Check Text On Screen|Check Text On Screen]] |
| | | | |
| | [[Action: Clear App Data|Clear App Data]] | | [[Action: Clear App Data|Clear App Data]] |
| Line 99: |
Line 110: |
| | | | |
| | [[Action: Delete Macro|Delete Macro]] | | [[Action: Delete Macro|Delete Macro]] |
| | + | |
| | + | [[Action: Delete Variable|Delete Variable]] |
| | | | |
| | [[Action: Demo Mode|Demo Mode]] | | [[Action: Demo Mode|Demo Mode]] |
| Line 107: |
Line 120: |
| | | | |
| | [[Action: Display Bubble Notification|Display Bubble Notification]] | | [[Action: Display Bubble Notification|Display Bubble Notification]] |
| | + | |
| | + | [[Action: Display Custom Scene|Display Custom Scene]] |
| | | | |
| | [[Action: Display Dialog|Display Dialog]] | | [[Action: Display Dialog|Display Dialog]] |
| Line 128: |
Line 143: |
| | [[Action: Export Macros|Export Macros]] | | [[Action: Export Macros|Export Macros]] |
| | | | |
| − | [[Action: File Operations V2|File Operations V2]] | + | [[Action: File Operation| File Operation]] |
| | | | |
| | [[Action: Fill Clipboard|Fill Clipboard]] | | [[Action: Fill Clipboard|Fill Clipboard]] |
| Line 143: |
Line 158: |
| | | | |
| | [[Action: Get Light Level|Get Light Level]] | | [[Action: Get Light Level|Get Light Level]] |
| | + | |
| | + | [[Action: Get Text From View Id|Get Text From View Id]] |
| | | | |
| | [[Action: GPS Enable/Disable|GPS Enable/Disable]] | | [[Action: GPS Enable/Disable|GPS Enable/Disable]] |
| Line 151: |
Line 168: |
| | | | |
| | [[Action: HTTP Request|HTTP Request]] | | [[Action: HTTP Request|HTTP Request]] |
| | + | |
| | + | [[Action: HTTP Server|HTTP Server]] |
| | | | |
| | [[Action: Immersive Mode|Immersive Mode]] | | [[Action: Immersive Mode|Immersive Mode]] |
| Line 213: |
Line 232: |
| | | | |
| | [[Action: Option Dialog|Option Dialog]] | | [[Action: Option Dialog|Option Dialog]] |
| | + | |
| | + | [[Action: Overlay Bar|Overlay Bar]] |
| | | | |
| | [[Action: Play/Stop Sound|Play/Stop Sound]] | | [[Action: Play/Stop Sound|Play/Stop Sound]] |
| Line 223: |
Line 244: |
| | | | |
| | [[Action: Read Screen Contents|Read Screen Contents]] | | [[Action: Read Screen Contents|Read Screen Contents]] |
| | + | |
| | + | [[Action: Read Screenshot Contents|Read Screenshot Contents]] |
| | | | |
| | [[Action: Reboot/Power Off|Reboot/Power Off]] | | [[Action: Reboot/Power Off|Reboot/Power Off]] |
| Line 238: |
Line 261: |
| | [[Action: Secure Settings|Secure Settings]] | | [[Action: Secure Settings|Secure Settings]] |
| | | | |
| − | [[Action: Selecttion Dialog|SelecttionDialog]] | + | [[Action: Selection Dialog|Selection Dialog]] |
| | | | |
| | [[Action: Send Email|Send Email]] | | [[Action: Send Email|Send Email]] |
| Line 259: |
Line 282: |
| | | | |
| | [[Action: Set Notification Sound|Set Notification Sound]] | | [[Action: Set Notification Sound|Set Notification Sound]] |
| − |
| |
| − | [[Action: Set Quick Settings Tile State|Set Quick Settings Tile State]]
| |
| | | | |
| | [[Action: Set Screen Lock|Set Screen Lock]] | | [[Action: Set Screen Lock|Set Screen Lock]] |
| Line 272: |
Line 293: |
| | [[Action: Share Last Photo|Share Last Photo]] | | [[Action: Share Last Photo|Share Last Photo]] |
| | | | |
| − | [[Action: Share Text|ShareText]] | + | [[Action: Share Text|Share Text]] |
| | | | |
| | [[Action: Share Location|Share Location]] | | [[Action: Share Location|Share Location]] |
| Line 279: |
Line 300: |
| | | | |
| | [[Action: Silent - Vibrate Off|Silent - Vibrate Off]] | | [[Action: Silent - Vibrate Off|Silent - Vibrate Off]] |
| | + | |
| | + | [[Action: Silent - Show Volume Popup|Show Volume Popup]] |
| | | | |
| | [[Action: Speak Text|Speak Text]] | | [[Action: Speak Text|Speak Text]] |
| Line 293: |
Line 316: |
| | | | |
| | [[Action: Take Screenshot|Take Screenshot]] | | [[Action: Take Screenshot|Take Screenshot]] |
| | + | |
| | + | [[Action: Text_from_Image_(OCR)|Text from Image (OCR)]] |
| | | | |
| | [[Action: Text Manipulation|Text Manipulation]] | | [[Action: Text Manipulation|Text Manipulation]] |
| Line 301: |
Line 326: |
| | | | |
| | [[Action: Touch Screen|Touch Screen]] | | [[Action: Touch Screen|Touch Screen]] |
| − |
| |
| − | [[Action: Tweet|Tweet]]
| |
| | | | |
| | [[Action: UDP Command|UDP Command]] | | [[Action: UDP Command|UDP Command]] |