[feature] read clipboard
This commit is contained in:
parent
6a5209a701
commit
6a7d715038
10
win/win.ahk
10
win/win.ahk
|
@ -187,3 +187,13 @@ ToggleActiveWinMaximum() {
|
||||||
WinMaximize, A
|
WinMaximize, A
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetSelectedText() {
|
||||||
|
tmp = %ClipboardAll% ; save clipboard
|
||||||
|
Clipboard := "" ; clear clipboard
|
||||||
|
Send, ^c ; simulate Ctrl+C (=selection in clipboard)
|
||||||
|
ClipWait, 0, 1 ; wait until clipboard contains data
|
||||||
|
selection = %Clipboard% ; save the content of the clipboard
|
||||||
|
Clipboard = %tmp% ; restore old content of the clipboard
|
||||||
|
return selection
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user