i want to press F1 and then make autohotkey hold the mouse left button and when i press again he releases it
how can i do that?
i want to press F1 and then make autohotkey hold the mouse left button and when i press again he releases it
how can i do that?
Mmm, I am a bit rusty in AHK programming, but here is what I tried, seems to work:
F1::
alt := not alt
If (alt)
{
MouseClick Left, 217, 51, , , D
}
Else
{
MouseClick Left, 217, 51, , , U
}
Return
I would use Click down and Click up
Click is generally preferred over MouseClick because it automatically compensates if the user has swapped the left and right mouse buttons via the system's control panel.
F1::
alt := not alt
if(alt)
{
Click down
}
else
{
Click up
}
(Written here since i cannot comment yet)
@DaMacc: I've needed to add Return
at the end of the hotkey procedure code to make it work for me.
F1::
alt := not alt
if(alt)
{
Click down
}
else
{
Click up
}
Return