Code: Select all
F1::Send, ^c
F2::Send, ^v
F3::Send, ^+v
F4::Send, ^a
XButton1::Send, ^v
XButton2::Send, {Shift}+{Down}^c
return
Code: Select all
F1::Send, ^c
F2::Send, ^v
F3::Send, ^+v
F4::Send, ^a
XButton1::Send, ^v
XButton2::Send, {Shift}+{Down}^c
return
Code: Select all
#IfWinActive ahk_exe notepad.exe
F1:: ; F1 = Copy selected text
Clipboard =
ControlGet, Clipboard, Selected,, Edit1
ClipWait, 0
If ErrorLevel
MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Return
F2:: ; F2 = Paste clipboard
XButton1::Send ^v ; XButton1 = Paste clipboard
F4:: ; F4 = Copy all text
Clipboard =
ControlGetText, Clipboard, Edit1
ClipWait, 0
If ErrorLevel
MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Return
XButton2:: ; XButton2 = Copy current line
Clipboard =
ControlGet, lineNum, CurrentLine,, Edit1
ControlGet, Clipboard, Line, %lineNum%, Edit1
ClipWait, 0
If ErrorLevel
MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Return
#IfWinActive
Users browsing this forum: downstairs, filipemb, OrangeCat and 171 guests