Hey, noob here.
I wanted to make a script to pause a playing VLC video when I click it. Sort of like how YouTube works.
So that would require sending {Space} with a left mouse click,
but only when hovering over the video, not any other part of the UI.
I noticed that when I hover the mouse over the playing video,
the ClassNN changes to ClassNN: VLC video output 00000292D0D9E2801
That last string of digits changes every time,
but the “VLC video output” part doesn't.
Will MatchMode save me in this case?
How would I make a script like this?
I have a feeling this is more complicated than I first thought.
Any help would be much appreciated!
(v2) VLC - click to pause
(v2) VLC - click to pause
Last edited by robinson on 26 Mar 2020, 04:28, edited 1 time in total.
Re: (v2) VLC - click to pause
I just made a simple script that seems to work good for me, inspired by https://autohotkey.com/board/topic/77296-vlc-media-player-left-click-video-to-pauseplay/
Code: Select all
;Left-click on the video in VLC toggles play/pause:
~LButton:: ;VLC window is already active here due to ~ in ~LButton
MouseGetPos _, _, _, ctrl ;Get name of control under mouse pointer
if (SubStr(ctrl, 1, 16) == "VLC video output") ; Is it the VLC video control?
{
SendInput "{Space}" ;Play/pause VLC
}
Return
Return to “AutoHotkey v2 Help”
Who is online
Users browsing this forum: No registered users and 2 guests