Mucho Posted October 21, 2011 Posted October 21, 2011 I am trying to do it with the following code. #include <Misc.au3> Do . . . While 1 If _IsPressed(02) Then TogglePause() Endif Wend until $count = 125 Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc The problem is that the addition of the code into the loop stops the loop. Now it executes only once. And I did not even press any key or mouse button.
bogQ Posted October 21, 2011 Posted October 21, 2011 something like this? #include <Misc.au3> $count = 0 Do If _IsPressed(02) Then TogglePause() until $count = 125 Func TogglePause() ToolTip('Script is "Paused"',0,0) Do Sleep(10) Until Not _IsPressed(02) Do sleep(100) ToolTip('Script is "Paused"',0,0) Until _IsPressed(02) Do Sleep(10) Until Not _IsPressed(02) ToolTip("") EndFunc 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.
Mucho Posted October 21, 2011 Author Posted October 21, 2011 Haven, Thanks for replying. I will trying it out on Monday when I'm back in the office.
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