Licht Posted July 2, 2015 Share Posted July 2, 2015 (edited) First time using Autoit, so please bear with me expandcollapse popupGlobal $Paused, $Runner HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() $Runner = Not $Runner While $Runner Send("{LCTRL down}") Send("{LEFT down}") Sleep(16000) Send("{LCTRL up}") Send("{LEFT up}") Send("{PGUP 4}") Send("{LCTRL down}") Send("{RIGHT down}") Sleep(16000) Send("{PGUP 4}") WEnd EndFuncBasically it's supposed to make me go from one end to the other while pressing on a button and also loop it, but the thing is that when I start the script it goes into Pause mode and I can't unpause it...Also I'm not very sure if the script works because I haven't been able to test it.Cant anyone tell me what went wrong with the script or is there anything im doing wrong? Edited July 2, 2015 by Licht Link to comment Share on other sites More sharing options...
Shane0000 Posted July 2, 2015 Share Posted July 2, 2015 Global $Paused = False, $Runner HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") While 1 Sleep(100) Select Case $Runner And Not($Paused) ConsoleWrite("Running" & @CRLF & "$Runner: " & $Runner & @CRLF & _ "$Paused: " & $Paused & @CRLF) Case Not($Runner) Or $Paused ConsoleWrite("Paused" & @CRLF & "$Runner: " & $Runner & @CRLF & _ "$Paused: " & $Paused & @CRLF) EndSelect WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused ToolTip("$Paused: " & $Paused) EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() $Runner = Not $Runner EndFuncIs this the goal? Link to comment Share on other sites More sharing options...
Exit Posted July 2, 2015 Share Posted July 2, 2015 Welcome to the forum I think it's running well. I just changed it to audiable alarm. expandcollapse popupGlobal $Paused, $Runner HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") While 1 Sleep(100) WEnd Func TogglePause() Beep(1000, 100) $Paused = Not $Paused While $Paused Beep(1000, 100) Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Beep(1000, 500) Exit 0 EndFunc ;==>Terminate Func ShowMe() Beep(3000, 100) $Runner = Not $Runner While $Runner Beep(3000, 100) ;~ Send("{LCTRL down}") ;~ Send("{LEFT down}") ;~ Sleep(16000) ;~ Send("{LCTRL up}") ;~ Send("{LEFT up}") ;~ Send("{PGUP 4}") ;~ Send("{LCTRL down}") ;~ Send("{RIGHT down}") ;~ Sleep(16000) ;~ Send("{PGUP 4}") WEnd EndFunc ;==>ShowMe App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Licht Posted July 3, 2015 Author Share Posted July 3, 2015 (edited) I can hear the beeping from the script running (not paused) yet nothing is happening. i tried changing it to Send("{a down}")Opened notepad and nothing's coming out.Aside from that it has to be holding down LCTRL and LEFT for 16 secs which it isnt. Instead it's sending it at a 16secs interval. Edited July 3, 2015 by Licht Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 6, 2015 Moderators Share Posted July 6, 2015 Basically it's supposed to make me go from one end to the other while pressing on a button and also loop itCan you please explain more about what you're actually trying to do? There has to be a better way than all those Sends. "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! 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