Search code examples
autohotkeymousedown

Autohotkey 1 right click on RButton press and 2 right click on RButton release


So what I want to do is create a code where: When I press the right click of the mouse, it should register as 1 right click, but while I hold it down, it shouldn't register me as still holding the right click. But as soon as I release it, it should click the right mouse again, this time 2 times, with a bit of delay between the clicks

*$RButton::
*$RButton Up::
    Click right
    sleep 50
    Click right
    KeyWait, RButton
Return

which is not working because it clicks 2 times at press (it should only once) and another 2 times at release


Solution

  • I'm probably misinterpreting something here, but..

    RButton::
        click right
    return
    
    RButton up::
        click right
        sleep 50
        click right
    return
    

    ?