Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
samhippo authored Apr 28, 2020
1 parent 35aaba8 commit c1bcadc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions mpv-contextmenu.ahk
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit c1bcadc

Please sign in to comment.