SetTitleMatchMode, Regex ;; Left click a video to pause/unpause it in VLC Media Player #If IsMouseOver("- VLC media player") ~LButton:: ; Note: VLC window is already active here due to ~ in ~LButton MouseGetPos _, _, _, ctrl ; Get name of control under mouse pointer if (SubStr(ctrl, 1, 7) == "VLC MSW") ; Is it the VLC video control? { SendInput, {Space} ; Play/pause VLC } return #If ;; Returns true if mouse pointer is over window with given title IsMouseOver(title) { MouseGetPos _, _, WinID return (WinExist(title " ahk_id " WinID)) }
VLC Media Player - left click video to pause/play
Started by
joelpt
, Feb 19 2012 01:59 PM
No replies to this topic
This is a simple script to pause/unpause a video in VLC Media Player with a left click on the video itself. Tested on VLC Media Player 2.0, it should work on 1.x fine though. Requires AHK-L to work, or if you use 'basic' AHK, you could replace the #If's with #IfWinActive's (and SetTitleMatchMode Regex).
#1
-
Posted 19 February 2012 - 01:59 PM