Line 1:
Line 1:
+
<div style="border-radius: 10px; background-color: #f4f4f4; padding: 20px; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);">
+
+
== Magic Text Overview ==
+
+
Many triggers, actions, and constraints allow you to configure some text fields. Often, you will find a button next to the text input field that contains the "..." label. This button displays a complete list of "magic text" fields available in the context you are using.
+
+
If you want to type them manually instead, if you know them, be aware that there may be spelling/typing errors.
+
+
=== How Magic Text Works ===
+
+
The magic text allows a different value to be substituted at the point of call, instead of the standard static text that never changes. For example, it's possible to add an action that references a variable via magic text, and that variable's value will be substituted at the point the action is executed.
+
+
=== Magic Text Formats ===
+
+
Magic text can be written in two ways:
+
* Curly braces: {value}
+
* Square braces: [value]
+
+
Curly brackets are not supported on very old versions like v5.20 and below, but it's recommended to use them when interacting with dictionaries/arrays, as square brackets can get confusing very quickly.
+
<div style="border-radius: 10px; background-color: #f4f4f4; padding: 20px; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);">
<div style="border-radius: 10px; background-color: #f4f4f4; padding: 20px; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);">
Line 68:
Line 88:
|-
|-
| Does it require a trigger? || No
| Does it require a trigger? || No
+
|}
+
+
{| class="wikitable" style="width:100%; text-align:left; border:none; background-color:#f2f2f2; border-radius: 10px; border: 1px solid #ddd;"
+
|-
+
! style="background-color:#1665B0; color:white; width:50%;" | Name
+
! style="background-color:#1665B0; color:white; width:50%;" | Application name
+
|-
+
| Magic text || {app_name}
+
|-
+
| Description || Gets the name of the application that was opened or closed according to the context.
+
|-
+
| Does it require a trigger? || Yes, it requires an Application Launched/Closed trigger to be present.
+
|}
+
+
{| class="wikitable" style="width:100%; text-align:left; border:none; background-color:#f2f2f2; border-radius: 10px; border: 1px solid #ddd;"
+
|-
+
! style="background-color:#1665B0; color:white; width:50%;" | Name
+
! style="background-color:#1665B0; color:white; width:50%;" | Application package
+
|-
+
| Magic text || {app_package}
+
|-
+
| Description || Gets the name of the application that was opened or closed according to the context.
+
|-
+
| Does it require a trigger? || Yes, it requires an Application Launched/Closed trigger to be present.
|}
|}
Line 90:
Line 134:
|-
|-
| Description || Temperature in degrees Celsius, e.g. 34°.
| Description || Temperature in degrees Celsius, e.g. 34°.
+
|-
+
| Does it require a trigger? || No
+
|}
+
+
{| class="wikitable" style="width:100%; text-align:left; border:none; background-color:#f2f2f2; border-radius: 10px; border: 1px solid #ddd;"
+
|-
+
! style="background-color:#1665B0; color:white; width:50%;" | Name
+
! style="background-color:#1665B0; color:white; width:50%;" | Bluetooth device name
+
|-
+
| Magic text || {bluetooth_device_name}
+
|-
+
| Description || Returns the name of the bluetooth device, may be more useful when using the "Any device" option.
+
+
For example, if headphones are connected, it will return the device name.
+
{bluetooth_device_name} = Headphones 1 Pro
+
|-
+
| Does it require a trigger? || Requires a Bluetooth trigger (device connected or device disconnected) to be present.
|}
|}
Line 100:
Line 161:
|-
|-
| Description || Cell connection type, e.g. 3G, 4G, 5G.
| Description || Cell connection type, e.g. 3G, 4G, 5G.
+
|-
+
| Does it require a trigger? || No
|}
|}
Line 111:
Line 174:
| Description || Number that identifies an individual cell within a cellular network. Used for mobile phones to connect to the network and for the network to send data to mobile phones
| Description || Number that identifies an individual cell within a cellular network. Used for mobile phones to connect to the network and for the network to send data to mobile phones
e.g. The cell identifier for a cell in New York City could be 310-200-0000. The LAC (310-200)
e.g. The cell identifier for a cell in New York City could be 310-200-0000. The LAC (310-200)
+
|-
+
| Does it require a trigger? || No
|}
|}
Line 121:
Line 186:
|-
|-
| Description || Returns the signal strength that your mobile device is receiving from the nearest cell tower. It is expressed in units called decibels-milliwatts (dBm), with -50 dBm being the strongest signal and -110 dBm being the weakest.
| Description || Returns the signal strength that your mobile device is receiving from the nearest cell tower. It is expressed in units called decibels-milliwatts (dBm), with -50 dBm being the strongest signal and -110 dBm being the weakest.
+
|-
+
| Does it require a trigger? || No
|}
|}
Line 132:
Line 199:
| Description || Retrieves the text from the clipboard.
| Description || Retrieves the text from the clipboard.
If you are on Android 10+ you should have a look at the [https://macrodroidforum.com/wiki/index.php/Action:_Clipboard_Refresh Refresh Cliboard action].
If you are on Android 10+ you should have a look at the [https://macrodroidforum.com/wiki/index.php/Action:_Clipboard_Refresh Refresh Cliboard action].
+
|-
+
| Does it require a trigger? || No
|}
|}
Line 219:
Line 288:
|-
|-
| Does it require a trigger? || No
| Does it require a trigger? || No
+
|}
+
+
{| class="wikitable" style="width:100%; text-align:left; border:none; background-color:#f2f2f2; border-radius: 10px; border: 1px solid #ddd;"
+
|-
+
! style="background-color:#1665B0; color:white; width:50%;" | Name
+
! style="background-color:#1665B0; color:white; width:50%;" | Application Launched/Closed
+
|-
+
| Magic text || {app_name}
+
|-
+
| Gets the name of the application that was opened or closed according to the context.
+
|-
+
| Does it require a trigger? || Yes, it requires an Application Launched/Closed trigger to be present.
|}
|}