#SingleInstance,force
SetTitleMatchMode, 2
SetKeyDelay, 0
CoordMode, Mouse, Relative
SetKeyDelay, 0
msgbox,,,启动复制脚本,请开始选择长按复制,0.8
~LButton::
cos_mousedrag_treshold := 2 ; pixels
MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
win1 := WinActive(“A”)
KeyWait LButton
MouseGetPos, cos_mousedrag_x2, cos_mousedrag_y2
win2 := WinActive(“A”)
WinGetClass cos_class, A
if(((abs(cos_mousedrag_x2 – cos_mousedrag_x) > cos_mousedrag_treshold
or abs(cos_mousedrag_y2 – cos_mousedrag_y) > cos_mousedrag_treshold)) and win1 = win2
and cos_class != “ConsoleWindowClass”)
{
send ^c
sleep 300
keywait,CTRL
keywait,c
keywait,lbutton
exitapp
}
return
看起来不错