Autohotkey - 如果没有按下鼠标左键

时间:2010-01-03 03:05:06

标签: autohotkey

希望做到这样的事情:

if leftmousebutton not depressed
    some other action

有人知道我会如何编码吗?

3 个答案:

答案 0 :(得分:1)

试试这个

GetKeyState, state, LButton 

if state = U
    some other action

答案 1 :(得分:1)

if !GetKeyState("LButton", "P")
    msgbox the left mouse button is not depressed.

GetKeyState() documentation

答案 2 :(得分:-1)

我对autohotkey一无所知,但是如果按下鼠标左键,设置leftMouseButtonPressed = true,当它被释放时,设置leftMouseButtonPressed = false,然后在if语句中,只需查看if leftMouseButtonPressed