~LButton::
cos_mousedrag_treshold := 50 ; 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
WinGetActiveTitle, Title
If Title contains firefox{
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")
{
clipboard := ""
sleep,500
SendInput ^c
Send LButton
;msgbox,%clipboard%
ClipWait, 2
;激活notepad++
WinActivate, ahk_exe EXCEL.EXE
;这个命令是检索目标窗口有输入焦点的控件
;ControlGetFocus, OutputVar, notepad++
SendInput ^v
SendInput {Down 27}
}
return
零基础小白 想用这个偷懒 不知道能不能行?
这个我怎么弄不成?
什么弄不成?