Pixel size of the screen

Visionbrasil

New member
???? sorry but i don't can find a variable named [ magic variable ]
Can you write it exactly how i must store it to a (shell Script?) expression like:
MyXrsolution:[ ???????? ]
 

dsnz

Well-known member
first please read the macrodroid wiki to understand some features of macrodroid

by "magic variable" we mean a special predefined variable that has some interesting value eg. battery level, screen resolution etc.

what you can do
1. add action
2. select "set variable" (in category "Macrodroid specific")
3. choose or create a text variable ( let's call it sreen_x and assume it's local)
4. at the "enter value" screen , click on button at the right with 3 dots inside
and scroll down until you find and select "Screen Resolution (X)"

regarding the shell script , it's easy to do this using the variable with the resolution value above
in the "enter script" screen , enter

MyXrsolution:[ [lv=screen_x] ]

(the [lv=screen_x] can be entered by typing it or by clicking on the button at the right with 3 dots inside and selecting the local variable screen_x

alternatively, if you don't use the resolution value in other place in your program
you can just follow the instructions for the shell script above but instead of selecting the local variable screen_x , you go further down in the list and select immediately "Screen Resolution (X)"
so your script is

MyXrsolution:[ [screen_res_x] ]
 

Visionbrasil

New member
4. at the "enter value" screen , click on button at the right with 3 dots inside
and scroll down until you find and select "Screen Resolution (X)"
Unfortunately, there is no entry in this list like "Screen Resolution (X)" or even something similar.

I have MacroDroid V 5.7.6 Pro on Android 10

Also i cant find "Screen Resolution (X)" in the Wiki List : https://macrodroidforum.com/wiki/index.php/Magic_text
 
Last edited:

dsnz

Well-known member
you should update !!
current version is 5.22.6 , yours is very old !!

the wiki can't contain all magic variables/text unfortunately as new ones are added (for example, soon macrodroid uuid will be added)
plus why read the wiki to see what's available when what you can use is in the list of variables ? 😂

I mentioned the wiki only because you seemed to not get that "screen resolution* is magic variable/text
(perhaps I confused you a bit because the wiki term is magic text but many people, and me too, use also the term magic variable, and sorry for that)
 

Visionbrasil

New member
Thank you for the tip "update my MacroDroid". That was the solution (y)
In the new version i found this magic variable "Screen Resolution (X)"

Now i have the Information who i want.

Thanks
 
Top