Hey everyone, I'm making a advanced password program taking many users and passwords and so on and so forth. My prblem is, I want users to be able to ,when they are going to enter their password, either input a string or press the back key to input another username. I discovered parallel api won't do this. Will I have to check for os.pullEvent and then break it down and insert it all into a string, like making my own read()
Parallel inputs
Started by Doyle3694, Oct 05 2012 04:36 PM
4 replies to this topic
#1
Posted 05 October 2012 - 04:36 PM
#2
Posted 05 October 2012 - 06:06 PM
a simple but not very clean method is to make one program ask for the username and then call a second program that asks for the password while having a coroutine listen for key presses, when the requred key is pressed it calls error() which terminates the current program - sending you back to the user prompt. there are more complicated but cleaner methods (developing your own function
/>) and if you would prefer that let us know
#3
Posted 05 October 2012 - 06:15 PM
I don't know if I exactly know what you mean, but I think that I've made one before: C1wgp6ex
Raw code:
Ofc if you want to change the way the program checks the password, just change the function checkLogin() to whatever you desire.
Or if you wan't the login() function to return true/false when done (you know, with a limited amount of tries): F4hgGUfL
Raw code:
Raw code:
Spoiler
Ofc if you want to change the way the program checks the password, just change the function checkLogin() to whatever you desire.
Or if you wan't the login() function to return true/false when done (you know, with a limited amount of tries): F4hgGUfL
Raw code:
Spoiler
#4
Posted 05 October 2012 - 09:34 PM
will look into coroutine. jagenummerett's code didn'thelp at all, wasn't really waht I ment.
#5
Posted 05 October 2012 - 09:35 PM
Also, can someone explain coroutine?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











