automax2012 Posted March 22, 2012 Posted March 22, 2012 Hello friends,I'm using HotKeySet("{ESC}", "MyExit") in my code to exit my script just by pressing ESC key.I have noticed that if I have an inputbox waiting for some input text, even if I press ESC, my script still waits until the inputbox has been closed by OK button, after text has been entered, or by Cancel, and only then the ESC command will be executed, exiting the script.Is there a way to force closing inputbox, by pressing ESC, when it is still waiting for text to be entered? (I cannot use Cancel button because I already use it to jump to the next input box in my script).Thanks in advance for any reply
notsure Posted March 22, 2012 Posted March 22, 2012 Hmm, normally the program is frozen at Msgboxes also, so i can imagine it works the same for inputboxes.
notsure Posted March 22, 2012 Posted March 22, 2012 Maybe thats because MSGboxes are canceled when pressed ESC and inputboxes are not? I'm notsure
automax2012 Posted March 22, 2012 Author Posted March 22, 2012 Right. It seems Msgbox can be forced to be closed, while InputBox not.
Moderators JLogan3o13 Posted March 22, 2012 Moderators Posted March 22, 2012 Automax, the help file is your FRIEND. One of the parameters for InputBox (as well as MsgBox) is the timeout feature: "How many seconds to wait before automatically cancelling the InputBox." If you need the InputBox to time out if there is no input, this is the easiest way to accomplish it. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
automax2012 Posted March 22, 2012 Author Posted March 22, 2012 Thanks JLogan3o13, but I would need to force closing inputbox by my choice (pressing ESC), not by timeout. Any idea how to do that?
bogQ Posted March 22, 2012 Posted March 22, 2012 maby to make your own custom input box with GUI commands? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
automax2012 Posted March 22, 2012 Author Posted March 22, 2012 Thanks bogQ, you're right, that's probably would work. I was just wondering if it was doable using the standard inputbox.
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