From a627baa482d30734d46f5aab6036f949d6b98f5b Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Sun, 6 Sep 2020 10:22:26 +0300 Subject: [PATCH] Add hotkey for opening current link in mpv --- app_handling.ahk | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app_handling.ahk b/app_handling.ahk index 16fd25c..e54c8f8 100644 --- a/app_handling.ahk +++ b/app_handling.ahk @@ -1,4 +1,4 @@ -#Include WinTitles.ahk +#Include WinTitles.ahk @@ -278,3 +278,22 @@ F4:: SendInput !{F4} ; SendInput {LButton} ; } ; } + + +CapsLock & v:: + openInMpv() { + ClipSaved := ClipboardAll ; Backup Clipboard + clipboard := "" + + Send ^l + Sleep 100 + Send ^a + Sleep 100 + Send ^c + ClipWait 1 + + Tippy("Opening mpv with: " Clipboard) + Run % "mpvnet.exe " Clipboard + + Clipboard := ClipSaved ; Restore Clipboard + }