From c1bcadce1558a46c834e6eca63bbea3f12a2a108 Mon Sep 17 00:00:00 2001 From: samhippo <63636707+samhippo@users.noreply.github.com> Date: Tue, 28 Apr 2020 12:06:44 -0700 Subject: [PATCH] Add files via upload --- mpv-contextmenu.ahk | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 mpv-contextmenu.ahk diff --git a/mpv-contextmenu.ahk b/mpv-contextmenu.ahk new file mode 100644 index 0000000..a6040b2 --- /dev/null +++ b/mpv-contextmenu.ahk @@ -0,0 +1,37 @@ +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +#Warn ; Enable warnings to assist with detecting common errors. +#SingleInstance FORCE ; Skip invocation dialog box and silently replace previously executing instance of this script. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + +Menu, SubMenu1, Add, Next, MenuHandlerC1 +Menu, SubMenu1, Add, Prev, MenuHandlerC2 +Menu, MyContextMenu, Add, Play/Pause, MenuHandlerP1 +Menu, MyContextMenu, Add, Fullscreen, MenuHandlerP2 +Menu, MyContextMenu, Add, Playlist, :SubMenu1 +return + +MenuHandlerC1: +Send {>} +return +MenuHandlerC2: +Send {<} +return +MenuHandlerP1: +Send {space} +return +MenuHandlerP2: +Send {f} +return + +#IfWinActive ahk_class mpv +#If MouseIsOver("ahk_class mpv") +RButton:: + Menu, MyContextMenu, Show +Return +#If + +MouseIsOver(WinTitle) { + MouseGetPos,xpos, ypos, Win + return WinExist(WinTitle . " ahk_id " . Win) +}