Jump to content

Recommended Posts

Posted

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
Posted

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.

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...