TheAutomator Posted February 16, 2014 Posted February 16, 2014 Hello, I'm having some troubles using hotkeyset() in a console window.. Is it my fault or is it just not possible? (using the 'Console.au3' UDF here) #include <Console.au3> HotKeySet('{ESC}','stop') Global $input While True Cout("Enter your name: ") cin($input) system("pause") WEnd Func stop() exit EndFunc Thanks. TheAutomator. Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
Bert Posted February 17, 2014 Posted February 17, 2014 Your while loop is preventing the HotKeySet from working AFAICT. Try using While 1, Select and Case in your loop instead of While True. The Vollatran project My blog: http://www.vollysinterestingshit.com/
TheAutomator Posted February 18, 2014 Author Posted February 18, 2014 (edited) MBALZESHARI, Your while loop is preventing the HotKeySet from working AFAICT. Try using While 1, Select and Case in your loop instead of While True. So you suggest I don't use "While True", ok. This is the code then: #include <Console.au3> HotKeySet('{ESC}','stop') Global $input While 1 Cout("Enter your name: ") cin($input) system("pause") WEnd Func stop() exit EndFunc I can't see how I can use "Select Case" in this little script and hotkeyset() works fine when I use it in other scripts with a "While True" loop... Thanks for the reply. TheAutomator. Edited February 18, 2014 by TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
JohnOne Posted February 18, 2014 Posted February 18, 2014 You got link to Console.au3? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
TheAutomator Posted February 18, 2014 Author Posted February 18, 2014 JohnOne, You got link to Console.au3? here you go: '?do=embed' frameborder='0' data-embedContent>> TheAutomator. Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
JohnOne Posted February 18, 2014 Posted February 18, 2014 (edited) It works, but can not seem to interrupt the console window, sorry, don't know why. If you hit escape before enter, it does exit. EDIT: I think MBALZESHARI may have been a little sleepy when writing the reply Edited February 18, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
TheAutomator Posted February 18, 2014 Author Posted February 18, 2014 (edited) JohnOne, I think MBALZESHARI may have been a little sleepy when writing the reply maybe so hit escape before enter does exit. hmmm do you think I have to ask the writer of that udf himself or would that be against the forum rules you think? TheAutomator. Edited February 18, 2014 by TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
JohnOne Posted February 18, 2014 Posted February 18, 2014 Wouldn't bother him for such a matter.Someone will come along who knows soon enough. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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