Jump to content

Recommended Posts

Posted

I have a script for a auto clicker and I made one for a menu. The menu has a start button stop button and it has exit and help on the Menu item. If someone could tell me how to make is so they are together and when you press "Start" the auto clicker starts, and when you press "Stop" it stops. I will post the scripts if they are needed to combine them.

Posted

Welcome to the forums!

Yes, you should always post your example script(s), if you have a question but don't have an example script, you should always make one so everyone else knows what exactly it is that you're asking.

Posted (edited)

I have a script for a auto clicker and I made one for a menu. The menu has a start button stop button and it has exit and help on the Menu item. If someone could tell me how to make is so they are together and when you press "Start" the auto clicker starts, and when you press "Stop" it stops. I will post the scripts if they are needed to combine them.

What about a pause hotkey?

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $counter = 0
HotKeySet("{F1}", "TogglePause");This will Toggle the pause on and off starting and stopping the script.
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
    $counter +=1
    ToolTip('Script is "Running"',0,0, $counter, 1)
    Sleep(700)
WEnd
;;;;;;;;

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

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","Your welcome!")
EndFunc

I hope this helps.

Edited by Debit
Posted

What about a pause hotkey?

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $counter = 0
HotKeySet("{F1}", "TogglePause");This will Toggle the pause on and off starting and stopping the script.
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
    $counter +=1
    ToolTip('Script is "Running"',0,0, $counter, 1)
    Sleep(700)
WEnd
;;;;;;;;

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

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","Your welcome!")
EndFunc

I hope this helps.

I'll try that, thanks.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...