Ravel Posted April 15, 2006 Share Posted April 15, 2006 Below is a script that i created and i am trying to get it to pause. However, i cant seem to get the commands right. I can get it to close with esc key, but i cant get it to pause with the chosen capslock key. Any ideas on what i am doing wrong? Global $Paused HotKeySet("{CAPSLOCK}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinActive('Delta Force, V1.5.0.5') While 1 MouseClick("left") Sleep(10) WEnd Func TogglePause() EndFunc Func Terminate() Exit EndFunc Link to comment Share on other sites More sharing options...
Simucal Posted April 15, 2006 Share Posted April 15, 2006 (edited) Maybe: Global $Paused = "False HotKeySet("{CAPSLOCK}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinActive('Delta Force, V1.5.0.5') While 1 If $Paused <> "True" Then MouseClick("left") Sleep(10) Else Sleep(10) EndIf WEnd Func TogglePause() If $Paused = "True" Then $Paused = "False" Else $Paused = "True" EndIf EndFunc Func Terminate() Exit EndFunc Edited April 16, 2006 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
greenmachine Posted April 15, 2006 Share Posted April 15, 2006 Well you have to make it do something when it goes into the pause function.... Global $Paused = 0 HotKeySet("{CAPSLOCK}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinActive('Delta Force, V1.5.0.5') While 1 MouseClick("left") Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep (10) WEnd EndFunc Func Terminate() Exit EndFunc Link to comment Share on other sites More sharing options...
Ravel Posted April 16, 2006 Author Share Posted April 16, 2006 Ok i will give it a try Link to comment Share on other sites More sharing options...
Ravel Posted April 16, 2006 Author Share Posted April 16, 2006 Well you have to make it do something when it goes into the pause function.... Global $Paused = 0 HotKeySet("{CAPSLOCK}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinActive('Delta Force, V1.5.0.5') While 1 MouseClick("left") Sleep(10) WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep (10) WEnd EndFunc Func Terminate() Exit EndFunc hey thanks... it worked like a charm! 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