Autohotkey - if left mouse button is not depressed
Looking to do something like this:
if leftmou开发者_高级运维sebutton not depressed
some other action
Does anybody know how I would go about coding that?
try this
GetKeyState, state, LButton
if state = U
some other action
if !GetKeyState("LButton", "P")
msgbox the left mouse button is not depressed.
GetKeyState() documentation
I don't know anything about autohotkey, but in the event the left mouse button is pressed down, set leftMouseButtonPressed = true
, and when it is released, set leftMouseButtonPressed = false
, and then in the if statement, just check if leftMouseButtonPressed
.
精彩评论