Is there any action to change value in any action box.
Eg:-
Action : Script
a = 900
I want to change this value 900 by selecting values in input diaglogue
Change values
Moderator: Martin
Re: Change values
You mean you want to have a dialog box that present multiple predefined value and you simply choose from them?
Use Input Dialog - Single Choice Menu, put 100,200,300,600,900,1200 or any value your predefined value at the List Values.
Or you can prepared the list in script, then paired with Input Dialog - Single Choice Menu
In the input Dialog, use {choice,listformat,comma} as the List Value (you can choose it directly by tapping the ellipsis)
The chosen value will be stored in variable {value}, use this in the following element.
Use Input Dialog - Single Choice Menu, put 100,200,300,600,900,1200 or any value your predefined value at the List Values.
Or you can prepared the list in script, then paired with Input Dialog - Single Choice Menu
Code: Select all
choice = newList(100, 200, 300, 600, 900, 1200 );
The chosen value will be stored in variable {value}, use this in the following element.
Code: Select all
a = value;
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Change values
I am making an snooze alarm.
It shows time only in seconds like 950 seconds.
How to convert it in minutes and second like 15 minutes and 50 seconds.
http://automagic4android.com/flow.php?i ... be984e4fda
It shows time only in seconds like 950 seconds.
How to convert it in minutes and second like 15 minutes and 50 seconds.
http://automagic4android.com/flow.php?i ... be984e4fda
Re: Change values
You can use getDurationString(). This will convert the duration from miliseconds to string. Example 950000 miliseconds become "15m 50s"
If you need the "m" in "minutes, you can use replace() to replace it. Do the same also for "s" and "h" (if needed).
Or you can do your own calculation and convert it using conventional method, example value is 950000
{duration} will be 15 minutes and 50 seconds
If you need the "m" in "minutes, you can use replace() to replace it. Do the same also for "s" and "h" (if needed).
Or you can do your own calculation and convert it using conventional method, example value is 950000
Code: Select all
minute = value / 60000;
second = value % 60000 / 1000;
duration = minute + " minutes and " + second + " seconds"
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.