我正在尝试(按住左键 1 秒)使其右键单击。这是我得到的:
LButton::
MouseClick, right, , , 1, 0, D
Sleep 0
MouseClick, right, , , 1, 0, U
return
如何将“LButton”输入改为“Hold LButton for 1 seconds”?
我正在尝试(按住左键 1 秒)使其右键单击。这是我得到的:
LButton::
MouseClick, right, , , 1, 0, D
Sleep 0
MouseClick, right, , , 1, 0, U
return
如何将“LButton”输入改为“Hold LButton for 1 seconds”?
这个怎么样...
LButton::
StartTime := A_TickCount ; Set the timer
KeyWait, LButton ; Wait for release of mousebutton
ElapsedTime := A_TickCount - StartTime ; Calculate elapsed time
if (ElapsedTime > 1000)
Click, Right ; when longer than 1000 ms
Click, Left ; when shorter than 1000 ms
return
缺点是您不能再使用鼠标来突出显示文本......
干得好:
#Persistent
#SingleInstance Force
#NoEnv
SetBatchLines, -1
global timeDown = 0
SetTimer, checkLeftClick,25
checkLeftClick:
if( GetKeyState("LButton" , "P") )
{
timeDown += 25
}
else
{
timeDown = 0
}
if(timeDown > 1000)
{
MouseClick , left , , , , ,U
Click,Right
timeDown = 0
}
return