Sign in to follow this  
Followers 0
Silly

how can i make this small script start out paused ?

3 posts in this topic

so i came up with this clicking script (for diablo 2)

and i like how it works, i jsut need to figure out how to start it out paused

:)

Global $delay = 100
Global $Paused
HotKeySet( "{PAUSE}", "TogglePause" )
HotKeySet( "{END}", "Terminate" )

While 1
    While $Paused = $Paused
        MouseClick( "left" )
        Sleep( $delay )
    WEnd  
    Sleep( 100 )
Wend

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites



First off, you definitely shouldn't have While $Paused = $Paused in any script. Of course $Paused is $Paused. How about this:

Global $delay = 100
Global $Paused
HotKeySet( "{PAUSE}", "TogglePause" )
HotKeySet( "{END}", "Terminate" )

TogglePause()

While 1
    MouseClick( "left" )
    Sleep( $delay )
Wend

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites

beautiful lol

thank you very much

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0