You need a squeak to lock the w a s d key , and the mouse at a certain pixel color
You need a squeak to lock the w a s d key , and the mouse at a certain pixel color
We need a script that would block the keys w a s d , and the mouse when the color is red on one of the pixels
Re: You need a squeak to lock the w a s d key , and the mouse at a certain pixel color
Welcome to this AutoHotkey forum!
Code: Select all
#Requires AutoHotkey v2.0
x := 1751 ; Screen coordinates
y := 247
rgb := 0xFF0000
block := 'MouseMoveOff'
SetTimer check, 100
#HotIf block = 'MouseMove'
w::
a::
s::
d::
LButton::
MButton::
RButton::
XButton1::
XButton2::
WheelUp::
WheelDown::
WheelLeft::
WheelRight::Return
#HotIf
check() {
Global block
CoordMode 'Pixel'
If rgb = color := PixelGetColor(x, y) { ; Color was found
If block != 'MouseMove' {
BlockInput block := 'MouseMove'
SoundBeep 1500
}
} Else { ; Color was not found
If block = 'MouseMove' {
BlockInput block := 'MouseMoveOff'
SoundBeep 1000
}
}
ToolTip color
}