vickerps Posted March 9, 2004 Posted March 9, 2004 Does anyone no how to setup a key that will exit the script I was trying with AdlibEnable("quit") Func Quit() IF HotKeySet ({esc}) Then Exit Endif Something like that. Can anyone help
Administrators Jon Posted March 9, 2004 Administrators Posted March 9, 2004 HotKeySet("{ESC}", "Terminate") ... ... ... ... Func Terminate() Exit EndFunc
vickerps Posted March 9, 2004 Author Posted March 9, 2004 first of all thanks for responding However i have already try that and it doesn't work for example HotKeySet("{ESC}", "Terminate") MsgBox(64, "Welcome", ' ' & @LF & @LF &'Please follow a few simple steps ') Func Terminate() Exit EndFunc I would like the script to terminate without clicking on the message box
everseeker Posted March 9, 2004 Posted March 9, 2004 (edited) Just a thought.... May want to experiment a bit... Does the hot key checking routine operate while waiting for user input? (In other words, the fact that the program is waiting for you to click "ok" before proceeding may mean that hotkey checking is suspended, as is the rest of the program, until you do so) Edited March 9, 2004 by everseeker Everseeker
Developers Jos Posted March 9, 2004 Developers Posted March 9, 2004 (edited) I would like the script to terminate without clicking on the message boxChange the MsgBox to a SplashTextOn. When you display a msgbox you are asking for user input or you can have the msgbox timeout after x seconds. Edited March 9, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
vickerps Posted March 9, 2004 Author Posted March 9, 2004 Thanks again But need to use a message box and it can not time out I understand what you are saying and i agree. that is why i was looking into the adlibenable command. Thanks anyway
Developers Jos Posted March 9, 2004 Developers Posted March 9, 2004 Thanks again But need to use a message box and it can not time out I understand what you are saying and i agree. that is why i was looking into the adlibenable command. Thanks anywaywhat about something like this? HotKeySet("{ESC}", "Terminate") HotKeySet("{ENTER}", "Continue") $Loop = 1 SplashTextOn ("Welcome", ' ' & @LF & @LF &'Please follow a few simple steps ') While $Loop=1 Sleep(200) Wend SlashTextOf() ; rest of the script Func Terminate() Exit EndFunc Func Continue() $loop = 0 EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
CyberSlug Posted March 9, 2004 Posted March 9, 2004 Explanation of behavior from the help file: If the current function is a "blocking" function, then the keypresses are buffered and execute as soon as the blocking function completes. MsgBox and FileSelectFolder are examples of blocking functions.Maybe the AutoGUI project could provide even more alternatives.... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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