Jump to content

Massive newb looking for help


Recommended Posts

Hey people,

i'm trying to make a script where i press a button and it does the left mouse click every so often at fast intervals untill i press that button again to make it stop.

so far i ahve this

While 1

MouseClick("left")

Sleep(150)

WEnd

can you help me put in a hotkey or whatever it is called?

thx for the help .

Link to comment
Share on other sites

I am sorry about your Weight.

As for the hotkeys:

Have a look at HotKeySet() in the helpfile. it gives you everything you want, may need slighy modification, but i am sure you can see what is needed (hint: Swap out the While ... WEnd statements, so that when the script is "paused" it is actually clicking and when it is "un-paused" it is not clicking.. this way, you will have to hit the hotkey to get the clicking to start)

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

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d

;;;; Body of program would go here ;;;;
While 1
    MouseClick("left")
    Sleep(150)
WEnd
;;;;;;;;

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

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc
Link to comment
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
 Share

  • Recently Browsing   0 members

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