bladerunner11 Posted January 26, 2007 Share Posted January 26, 2007 How do I use a F11 key to stop or pause my script without killing the processor under the windows task manager? Or is there a build-in function (keyboard key) that allows me to stop the script? I am using a while loop to check my log files. Here is an example: while 1 ; comment: I would like to use a key F11 keyboard key to stop or pause the script. mycheck_log_func wend I would like to thank you for taking the time to read my post. -Thanks in advance. The_Runner Link to comment Share on other sites More sharing options...
Zedna Posted January 26, 2007 Share Posted January 26, 2007 (edited) Search results for "+pause +script" Edited January 26, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
xcal Posted January 26, 2007 Share Posted January 26, 2007 (edited) HotKeySet('{F11}', 'toggle') HotKeySet('{Esc}', 'quit') Local $pause While 1 ToolTip('Script is running') While $pause ToolTip('Script is paused') Sleep(50) WEnd Sleep(50) WEnd Func toggle() $pause = Not $pause EndFunc Func quit() Exit EndFunc edit - Oops, sorry Zedna, didn't mean to step on your post. I was typing. Edited January 26, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Zedna Posted January 26, 2007 Share Posted January 26, 2007 edit - Oops, sorry Zedna, didn't mean to step on your post. I was typing. No problem.Every help is welcome especially for noobies Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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