Livestreamer (http://livestreamer.tanuki.se) is a CLI for streaming videos. I use it mainly for watching League of Legends streams on twitch.tv and Youtube but it supports a bunch of different websites. You need to have it installed for this script to work. You'll also need to download json.ahk from here: https://raw2.github.com/cocobelgica/Aut ... r/JSON.ahk
You're going to want to change the favoritestreams variable toward the top to your own favorite streams (in the order you prefer). The script reads your clipboard and then this list and checks for valid streams. With the first hotkey (which you can change) it will launch a GUI to select from the valid streams in your list (valid as in connected). If you use the second hotkey it looks for valid streams and then launches the first one it finds. The clipboard can contain any twitch.tv or youtube.com URL and launch it (including VODs with or without time codes, e.g. &t=01h52m30s).
This is the script as I use it. Feel free to take from it and modify and distribute as you please. Also, if you have any comments or suggestions or bug reports, let me know. This is my first AHK script.
v1.1
http://pastebin.com/xxA7BhQq
v1.01
http://pastebin.com/zws8jrBp
v1.0
http://pastebin.com/UTkzEepc
Livestreamer GUI (livestreamer.tanuki.se)
Livestreamer GUI (livestreamer.tanuki.se)
Last edited by Sojik on 19 Feb 2014, 12:56, edited 2 times in total.
Re: Livestreamer GUI (livestreamer.tanuki.se)
Tested it this morning and realized it just silently exits when there are no streams found online so I added a MsgBox to let you know that it worked but just didn't find anything available.
http://pastebin.com/zws8jrBp
http://pastebin.com/zws8jrBp
Re: Livestreamer GUI (livestreamer.tanuki.se)
I've been work on this and learning more and more about AHK. I removed the hotkeys and the #Persistence flag. I was getting odd behavior when working on the script because I don't understand how functions work quite yet. I don't really get the having to declare global variables.
Sometimes running the script a couple times it would throw an error because the GUI drop down that I'm making was changing. I didn't realize it would care after the GUI was destroyed. I tried messing with it for awhile until I just decided this was a simpler solution.
To launch the script in quick-mode (no GUI) just pass the script any parameter. If you want to use a hotkey for the script here's what I'm using:
v1.1
http://pastebin.com/xxA7BhQq
Sometimes running the script a couple times it would throw an error because the GUI drop down that I'm making was changing. I didn't realize it would care after the GUI was destroyed. I tried messing with it for awhile until I just decided this was a simpler solution.
To launch the script in quick-mode (no GUI) just pass the script any parameter. If you want to use a hotkey for the script here's what I'm using:
Code: Select all
PrintScreen::RunWait, Livestreamer.ahk ; Launch GUI
*PrintScreen::Runwait, Livestreamer.ahk true ; Quick-Mode (No GUI)
http://pastebin.com/xxA7BhQq
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: gwarble and 123 guests