第一次在这里发帖。到目前为止我有这个脚本。
CAPSLOCK::Suspend
lbutton:: ;
{
MouseCLick, Left
MouseClick, Right
}
我想让我的左键单击表现得好像我同时单击了左键和右键单击。虽然这可行,但它只记录为 1 次单击。我可以添加一个脚本吗?如果我按住左键单击,它将表现得好像我同时按住了左键单击和右键单击,如果我放开,它就会停止?
答案1
你需要获取鼠标的状态
GetKeyState, keystate, Lbutton,P
if keystate = U
break
我想你需要某物类似(从上述来源复制,但经过修改)
*~LButton::
; ~makes it execute the LeftClick like normal then the script kicks in
; * means it will also work while holding other keys like shift
Sleep 500
loop{
;check 3x every Xms if the button got released
Sleep 200
GetKeyState, keystate, Lbutton,P
if keystate = U
break
Sleep 200
GetKeyState, keystate, Lbutton,P
if keystate = U
break
Sleep 200
GetKeyState, keystate, Lbutton,P
if keystate = U
break
else
; do the click then loop
MouseClick, left
MouseClick, Right
}
return