Monkey Posted February 21, 2009 Posted February 21, 2009 Hi! Im learning about autoit and i came into inputbox thingy. where you type password. and i use the inputbox() with a timeout for about 30 secs. but i want a timer to be shown so the user will see how many time is remaining. A helping hand would be really appreciated! thanks!
seandisanti Posted February 21, 2009 Posted February 21, 2009 Hi! Im learning about autoit and i came into inputbox thingy. where you type password.and i use the inputbox() with a timeout for about 30 secs. but i want a timer to be shown so the user will see how many time is remaining.A helping hand would be really appreciated!thanks!You're probably going to have to end up doing this one with a custom GUI that looks like an input box. The reason is that your code stops executing while waiting on a response for the user. Or you could go the ugly hack way, and use one of the multithread simulating algorithms on the forum to launch one thread that asks for input, and another that updates the text of the input box with controlsettext()
Monkey Posted February 21, 2009 Author Posted February 21, 2009 You're probably going to have to end up doing this one with a custom GUI that looks like an input box. The reason is that your code stops executing while waiting on a response for the user. Or you could go the ugly hack way, and use one of the multithread simulating algorithms on the forum to launch one thread that asks for input, and another that updates the text of the input box with controlsettext()thats exactly whats happening, my timer wont start unless i press a button...or the user input something....sigh....
seandisanti Posted February 21, 2009 Posted February 21, 2009 thats exactly whats happening, my timer wont start unless i press a button...or the user input something....sigh....search for multi-threading on the forum. you'll see a couple of ways to have 2 sets of code executing. for this particular task it would actually be very easy. you will be able to do what you want with really less than 5 minutes of effort.
Drew Posted February 21, 2009 Posted February 21, 2009 I second the idea of a custom GUI. This is very simple using Koda's... and would probably be easier then multi-threading granted you've had no prior experience.
jvanegmond Posted February 21, 2009 Posted February 21, 2009 search for multi-threading on the forum. you'll see a couple of ways to have 2 sets of code executing. for this particular task it would actually be very easy. you will be able to do what you want with really less than 5 minutes of effort.Even though we just had an argument in another thread. I would like to point out that using multi threading is not your over the counter solution for a programming challenge. With something as trivial as creating a GUI with a time out, I think that multi threading should not be used.I spent a bit of time searching around and found this article that explains why multi threading is not a good idea: http://www.codingwithoutcomments.com/2008/...ot-a-good-idea/I've immediately quoted a part of it and put it in my signature. I personally think it describes many cases where multi threading may have not been such a good idea after all. github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now