Jump to content

help

bougarri

please guys can someone help me i am new to autohotkey.I want to make a script that pauses a youtube video while the window of google chrome is unfocused with the hotkey f2 i rly need it and i did get to work plzzzzz

Link to comment
Share on other sites

Link to post
Share on other sites

How is this easier than just pausing the video? I'm not sure if you can do this. The window will need to have focus I think to register the signel. Or you somehow need to directly pass it to Chrome or something.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, tikker said:

How is this easier than just pausing the video? I'm not sure if you can do this. The window will need to have focus I think to register the signel. Or you somehow need to directly pass it to Chrome or something.

it is easier since i dont need to exite out of the window i am in and have to pause the video.i think it is pretty easy for anyone with a decent autohotkey knowledge 

Link to comment
Share on other sites

Link to post
Share on other sites

I think its possible. 
But for this to work chrome must be the last previous application used and the youtube page must be the one in focus on the browser. 

The sequence then becomes something like this: 
F2 = Alt+Tab -> Space (only works if the video player is focused) -> Alt+Tab (back into your main application)

Another approach might be to make use of some smart Add On in Chrome, which I don't know if it exist, that makes sure that even if you are unfocused on the video player it makes sure that during a certain event (like pressing Space + Alt or whatever keybind it might use) it pauses it for you. In that way you can set up your sequence in a more failsafe manner. As always you can tweak the sequence to make it more failsafe. 

There are surely more ways to approach this problem, maybe you come up with an more elegant solution than this. :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×