Magic text2

Revision as of 19:31, 5 December 2023 by JosueGd (talk | contribs) (Created page with "== About == <pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;"> In many triggers, actions and constraints you will have the option to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

About

In many triggers, actions and constraints you will have the option to configure some textual fields. Often you will find a button next to the text entry field that contains the "..." label. This button will display a complete list of "magic text" fields that are available in the context that is being used.

If you wish to manually type them instead if you know them, be aware that there can be spelling/typing mistakes.

Magic text for dictionaries/arrays is written like this :
[lv=dictionary/array name[entry][sub-entry]]
There can be as many [sub-entry] as you want. Be aware that it can get complicated pretty fast! Curly {} brackets were added so users would see the beginning and end of a dictionary/array magic text 
with ease.

The magic text allows some other value to be substituted at the point of invocation, rather than standard static text that will never changed. For example it's possible to add and action that reference a variable via magic text and that variable's value will be substituted at the point that action is run.

Magic text can be written in 2 ways : Curly brackets {value} and square brackets [value]. Curly brackets aren't supported on very old versions like v5.20 and below but it's recommended to use it when interacting with dictionaries/arrays as with square brackets it can get confusing where you are very quickly.

Requires a trigger to operate

Apllication Launched/Closed

[app_name] - Returns the name of the application that was launched, for example "MacroDroid".

[app_package] - Returns the package name of the application that was launched, for example, if it were MacroDroid the response would be "com.arlosoft.macrodroid".


Does not require a trigger to operate

Does not depend on a trigger

MacroDroid Mode

Texto de la subsección 2.1