Dissable right/left mouse click in function
Dissable right/left mouse click in function
-
Last edited by Cruglk on 21 Jan 2018, 22:29, edited 1 time in total.
Re: Dissable right/left mouse click in function
here's one way to do it
Code: Select all
global blockButtons := false
#IF blockButtons ;if blockButtons == true
lbutton::
rbutton::
return
#IF ;reset hotkey condition, all hotkeys below will always function
~LCtrl & LButton::
if(...){
name(x,y)
}
Return
name(x,y){
...
if(name != ""){
blockButtons := true ;sets global blockButtons to true, causing lbutton/rbutton to do nothing
SendInput {enter}
sleep 100
SendInput, ss %name%
sleep 100
SendInput {enter}
blockButtons := false
return
}
}
Some of my AHK programs: 3D Voxel Game - Platformer Game
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
Re: Dissable right/left mouse click in function
Code: Select all
static null := objBindMethod({},{})
Hotkey, LButton, % null, Off
Msgbox
Hotkey, LButton, % null, On
Re: Dissable right/left mouse click in function
-
Last edited by Cruglk on 21 Jan 2018, 22:28, edited 1 time in total.
Re: Dissable right/left mouse click in function
It's actually
was on mobile.
Code: Select all
null := objBindMethod({},{})
Hotkey, LButton, % null, On
Msgbox
Hotkey, LButton, % null, Off
Who is online
Users browsing this forum: Billykid and 220 guests