Page 1 of 1

Please help me

Posted: 19 Sep 2020, 11:42
by geps
Hey i want to make a code like when i hold left click it makes my command and when i release it it stops.Please help

Re: Please help me

Posted: 19 Sep 2020, 12:14
by ositoMalvado

Code: Select all

LButton::
;Actions to do when LButton is pressed
return

LButton up::
;Actions to do when LButton is released
return

Re: Please help me

Posted: 20 Sep 2020, 08:27
by geps
do i write my code instead of "actions"?

Re: Please help me

Posted: 20 Sep 2020, 17:23
by Yakshongas

Code: Select all

LButton::
While, GetKeyState(A_ThisHotkey, "P")
{
    ;Commands to execute
}
Return