IF - Magic text

FrameXX

Well-known member
While I was helping SuperDaniel I realized how unnecessarily complicated is to check if certain magic text have certain value that is not your custom variable but still text or another magic text. You need to create your variable and set value to your text you want or use "set variable" action inside macro (in case you want to compare magic text and magic text) to be even able to use "if variable" to check the magic text. Would it be possible to implement such a function to simply allow us, to directly check value of Magic text?

For example:
If [year]*[day] < 2343
If [device_name] = Mi A2 Lite
If [battery_temp] > [battery]
If [android_version_sdk] < 29

If [ssid] contains 5G
......
 
Last edited:

Dm114

Well-known member
Seems reasonable, I guess this would exist as a constraint but I'm not sure what it could be called that would make sense to everyone.

Any suggestions?
It could be interesting to spare some lines in coding but, to be honest, to me it's not mandatory. Just a matter of "comfort". And if comfort is "cheap" or affordable for you, Jamie, why not...
 

FrameXX

Well-known member
It could be interesting to spare some lines in coding but, to be honest, to me it's not mandatory. Just a matter of "comfort". And if comfort is "cheap" or affordable for you, Jamie, why not...
That's actually good opinion. But I think many users missed the thought that they could use magic text as a direct constraint for a macro, action or trigger, because it's so cumbersome to do.
 

chaoscreater

Active member
Is this still a work in progress? Would really love to use if [device_name] and use the same macro for multiple devices, but have them do separate things depending on the device name
 

FrameXX

Well-known member
Is this still a work in progress? Would really love to use if [device_name] and use the same macro for multiple devices, but have them do separate things depending on the device name

You can easily overcone this missing feature. Just create a string or integer variable in your macro (depends on what you want to check), then set variable with your magic text and then use contraint if variable.
 

chaoscreater

Active member
You can easily overcone this missing feature. Just create a string or integer variable in your macro (depends on what you want to check), then set variable with your magic text and then use contraint if variable.
Hmm so this doesn't work for Dictionary type variables. Like, if I have a dictionary boolean entry, I can't just create a boolean variable and set it to the same value as the dictionary entry's boolean.

UPDATE:
Actually, looks like I need to create a STRING variable and then I can set it to the "boolean" iterator value.
 
Last edited:
Top