Create password

Post your questions and help other users.

Moderator: Martin

Post Reply
Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Create password

Post by Lucy » 02 Nov 2019 15:54

Is it possible to use an action like a "dialog" to create a temporary password wich can later be used in certain actions?

Horschte
Posts: 56
Joined: 03 Nov 2014 18:00

Re: Create password

Post by Horschte » 02 Nov 2019 21:11

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);
}

Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Re: Create password

Post by Lucy » 04 Nov 2019 02:09

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?!

Lucy
Posts: 225
Joined: 10 Aug 2019 11:24

Re: Create password

Post by Lucy » 04 Nov 2019 03:23

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!?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Create password

Post by Desmanto » 05 Nov 2019 18:14

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.
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.

Post Reply