Send a command to YouTube in the background Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Elermino
Posts: 114
Joined: 29 Nov 2021, 17:43

Send a command to YouTube in the background

Post by Elermino » 07 Dec 2021, 13:59

I want to send command 0 on youtube which makes the video rewind from another application with just one press of a shortcut and without the need to focus the browser, or at least it recovers the focus to the window I was using


prestonage
Posts: 35
Joined: 17 Nov 2021, 10:53

Re: Send a command to YouTube in the background

Post by prestonage » 08 Dec 2021, 07:40

ControlSend will almost certainly not work, but it depends on the program. Chromium-based browsers will not work with it, and neither will Firefox. I'm not sure what that leaves you with to use.

Threads to see:

viewtopic.php?f=76&t=67985&p=292422#p292422

viewtopic.php?p=299603#p299603

viewtopic.php?t=96785

User avatar
boiler
Posts: 16771
Joined: 21 Dec 2014, 02:44

Re: Send a command to YouTube in the background

Post by boiler » 08 Dec 2021, 08:57

Elermino wrote: …or at least it recovers the focus to the window I was using
To accomplish this:

Code: Select all

F3:: ; change to desired hotkey
	WinGet, ActiveID, ID, A
	WinActivate, ahk_exe chrome.exe ; use the process name of your browser
	Send, 0
	WinActivate, ahk_id %ActiveID%
return

User avatar
Elermino
Posts: 114
Joined: 29 Nov 2021, 17:43

Re: Send a command to YouTube in the background  Topic is solved

Post by Elermino » 09 Dec 2021, 16:19

boiler wrote:
08 Dec 2021, 08:57
Elermino wrote: …or at least it recovers the focus to the window I was using
To accomplish this:

Code: Select all

F3:: ; change to desired hotkey
	WinGet, ActiveID, ID, A
	WinActivate, ahk_exe chrome.exe ; use the process name of your browser
	Send, 0
	WinActivate, ahk_id %ActiveID%
return
Just what i wanted to do, thanks

Post Reply

Return to “Ask for Help (v1)”