Copiar na implementação selecionada:
Tente assim:
#NoEnv
#SingleInstance Force
mousedrag_treshold := 20 ; pixels
Hotkey mbutton, paste_selection
; #IfWinNotActive ahk_class ConsoleWindowClass
~lButton::
MouseGetPos, mousedrag_x, mousedrag_y
keywait lbutton, T0.3
If (ErrorLevel)
{
keywait lbutton
mousegetpos, mousedrag_x2, mousedrag_y2
if (abs(mousedrag_x2 - mousedrag_x) > mousedrag_treshold
or abs(mousedrag_y2 - mousedrag_y) > mousedrag_treshold)
{
; MouseGetPos,,,WindowUnderMouse
; WinGetClass, Class, ahk_id %WindowUnderMouse%
; If (Class != "ConsoleWindowClass")
sendinput ^c
hotkey mbutton, on
}
}
return
~lButton Up:: return
; #IfWinNotActive
paste_selection:
sendinput {lbutton}
SendInput ^v
return