Jump to content
Sign in to follow this  
MasonMill

attaching a send to a mouseclick

Recommended Posts

MasonMill

Hey guys,

I would like to attach another keystroke to a mouseclick, like when i click the mouse i would like it to be able to click say the s button. And want to be able to toggle in and out of doing so. Here is what i have so far, any suggestions? Thanks in advance!

Global $Changed
HotKeySet("{INSERT}", "ToggleChanged")


While 1
    Sleep(100)
WEnd


  Func ToggleChanged()
    $Changed = NOT $Changed
    
    While $Changed
        If MouseClick("left") Then
            send("s")
            sleep(200)
            MouseClick("left")
            sleep(20)
        EndIf
    WEnd

EndFunc

Share this post


Link to post
Share on other sites
MasonMill

This way just gets stuck in the while loop inside the ToggleChange loop and continues to press s and mouseclick. I just want it to do it once though.

Share this post


Link to post
Share on other sites
MasonMill

awesome, will do! Thanks!

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  

×