AHK with command ^!ENTER::Send {Media_Play_Pause} doesn't work in Windows 11
I want to be able to play and stop a Youtube Video using Auto Hot Key while I am using the Vs Code editor, without the need to stop and play the video with the mouse. That will save some time.Any help would be appreciated.
I can rewind back and forth, but I want to be able to play/pause it as well.
^!ENTER::Send {Media_Play_Pause} ( Only this command does Not work )
So far I have this script:
#SingleInstance, Force
SetTitleMatchMode, 2
SetBatchLines, -1
SetWinDelay, -1
^!ENTER::Send {Media_Play_Pause} ; ( Only this command does Not work )
^!Left::
WinGet, Current_Window, ID, A
WinActivate, - YouTube
ControlGetPos, conX, conY, , , ChromeRenderWidgetHostHWD1
ControlClick,, A,,,, % " X" (conX+1) " Y" (conY+1)
ControlSend, , {Left 3}, A
WinActivate, % "AHK_ID" Current_Window
return
^!Right::
WinGet, Current_Window, ID, A
WinActivate, - YouTube
ControlGetPos, conX, conY, , , ChromeRenderWidgetHostHWD1
ControlClick,, A,,,, % " X" (conX+1) " Y" (conY+1)
ControlSend, , {Right 3}, A
WinActivate, % "AHK_ID" Current_Window
return
Comments
Post a Comment