Page 1 of 1

Create password

Posted: 02 Nov 2019 15:54
by Lucy
Is it possible to use an action like a "dialog" to create a temporary password wich can later be used in certain actions?

Re: Create password

Posted: 02 Nov 2019 21:11
by Horschte
I don't fully understand what you are trying to achieve.

You can create a password in Action Script: create a list with your desired characters. Then make a for-loop and randomly select a character from your list.

Code: Select all

chars = newList("1", "2", "3", "a", "b", "c");
pw = "";
for(i in [1 to 8]){
  pw = pw + getRandomElement(chars);
}

Re: Create password

Posted: 04 Nov 2019 02:09
by Lucy
Ok let me explain in a little more detail.. i have created a flow that changes several system settings as well as restricts data usage, wifi, tethering, calls, etc a lot better than android offers. The flow is initiated typically by a shortcut. It all works and even cirrects the settings if someone changes them (some) however, with one of my restrictions is a timer based flow where operators choose the length of time. This option comes up as a dialogue so i dont have to manually enter the flow and change values or have seperate flows and is unprotected. I was hoping i can password protect it somehow and maybe even change password from a prompt on the fly?!

Re: Create password

Posted: 04 Nov 2019 03:23
by Lucy
I think the easiest way would to have a particular action conditioned with a dialogue that matches a value that has been pre written to a file or variable. Im just not sure how to implement such a task. So in theory i would asume that one could make a flow or section of flow to save a string to a file. Then Use a dialoge off a condition of an action in another flow or the same flow, whatever to match the string in the saved file. And if it is a match then the condition is true, if not a match then condition is false!?

Re: Create password

Posted: 05 Nov 2019 18:14
by Desmanto
Does a simple input dialog - passwordd or pin works? You can simply use the expresion and check the password, if false, then stop the flow and not continue to the main shortcut function.

When setting the first timer, you can choose the time and then input the password to disable the "profile". Save this password in the globar variable. If the operator need to disable the profile when the time is out yet, they simply type it the password. Of course you have to protect the automagic itself.

Other method, you can use widget, and use invisible combination to set a password. Maybe a tap here, a swipe there or anything. But it is much more difficult to set up and require many testing to ensure it works properly.