AutoHotkey Community

It is currently May 27th, 2012, 12:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 134 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next
Author Message
PostPosted: July 3rd, 2011, 3:10 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
Aaron's YouTube Television
v2.2.2.7 (Feb. 8th 2012)
- Assign videos permanently to 9999 available channels.
- Option to download any of your channels' videos to your computer.
- Never lose your saved channels, even with program updates!

Image

System Requirements:
- Windows XP, Vista, 7+ (32 or 64-bit)
- Adobe Flash Player (latest version 11 required for 64-bit users)
- AHK_L v1.1.03.00+ (does not work on AHKv2 apparently)
- The ability to copy and paste YouTube URLs
- an MP4 codec to play downloaded videos on your computer
(I would suggest the K-Lite Codec Pack, the basic version)

Download latest version:
Aaron's YouTube Television.ahk (requires AHK_L v1.1.03.00+)
Aaron's YouTube Television.exe (recommended, works for all)

Information:
The power switch is on the top right of the window.
- Press 'On', animated snow is shown, channel buttons are now enabled.
- Change channels with the '<' or '>' buttons, or use 'PageUp' and 'PageDown'.
- Jump to any channel directly with the '!' button - type in requested channel
- Click '<<' and '>>' buttons to take you to the nearest empty channel
- Click 'Always on top' checkbox to toggle the TV as the topmost window
- Click 'Add' to assign video to current channel.
- Click 'Remove' to erase video from current channel.
- Click 'Download' to download current channel's video.
- Click 'Channel List' to see a HTML page with your currently assigned channels (the entries link to the YouTube host webpage for the video).
- Click the 'Always on top' Checkbox to toggle TV as the topmost window
- Press 'Off' and the TV screen goes black, channel-changer buttons are disabled.


The stored URLs and channel list files are created in:
YourDocuments\Aaron's YouTube Television

There are 9999 available channels the User can program.
Please use the "Add" and "Remove" buttons freely!

If there are any bugs, please report them to me...
Remember, not all YouTube videos can be assigned to channels or downloaded!

Version History:
Code:
v1.0.0.0 - built gui and made some channels work
v1.1.0.0 - added channel up and down buttons, channels stored in .INI
v1.2.0.0 - added feature which programs television with YouTube videos of User's choice
v1.3.0.0 - optimized the YouTube player for the window with the best arrangement of embed tags
v1.4.0.0 - added "Remove" button for erasing channels, arranged and commented code for readability
v1.4.2.0 - Used nimda's idea to shorten and optimize button sections
v1.5.0.0 - made 9999 channels available instead of 999 (turns out to be very slow, must be changed back)
v2.0.0.0 - rebuilt tv to version 2, only 999 channels but this makes managing channels easier for now
v2.0.1.0 - repaired some faulty HTML code, removed extra 'object' tag (may cause problems displaying html)
v2.0.1.1 - renamed channel backup folder in Documents to "Aaron's YouTube Television"
v2.0.1.2 - blank screen image is now retrieved from URL instead of %A_Temp% folder, and displays properly
v2.0.1.3 - User can use either the URL from the browser's main address bar or from the 'Share' button
v2.0.2.0 - applied 'Loop' commands properly instead of incorrect 'GoSub' commands
v2.0.3.0 - when current channel is added or removed, it instantly refreshes to show the changes (usually)
v2.0.4.0 - replaced incorrect html code (which uses WMP) with proper flash 'object' and 'embed' code
v2.1.0.0 - "Fast INI Library" functions implemented by rseding91, speeds up creation of Channel List file
v2.1.1.0 - same functions extended into add/remove channels, to keep Channel List file always current
v2.1.2.0 - back to 9999 channels, made 'playlist URL maker' but it crashed flash player, working on it
v2.1.3.0 - added a UrlList.ini convertor, Users can use their existing channel list with its new layout
v2.1.4.0 - when channel list entries are clicked, User is now taken to video's host Youtube webpage
v2.1.5.0 - rseding91's function to delete any remaining empty keys in UrlList.ini is now active
v2.2.0.0 - User can now download videos at any time while on an active channel, thanks to Garry
v2.2.0.1 - implemented rseding91's function to numerically sort all the keys in the INI file
v2.2.0.2 - various optimizations, increased number of channels to 99999, added text fade function by ih57452
v2.2.0.3 - all fade text now fades at the same time. Buttons are now disabled if they have no current use.
v2.2.0.4 - added 'Please do not exit TV until completed!' underneath 'Downloading [video name]' for clarity
v2.2.0.5 - updated Garry's YouTube download code (YouTube changes their codes every once in a while)
v2.2.0.6 - removed COM.ahk function from inside script, as it was causing issues with x64 ahk users
v2.2.0.7 - added "Play All" button but have not yet figured out how to make it work
v2.2.0.8 - fixed glitch in "Jump To Channel" feature which was allowing letters to be accepted
v2.2.0.9 - channel title becomes default text in Download button's InputBox, I also validated all the HTML
v2.2.1.0 - video title is now retrieved from parent webpage, becomes default text in 'Add' button's InputBox
v2.2.1.1 - added buttons to skip down or up to the first available empty channel, add new videos easily
v2.2.1.2 - all input boxes now open up directly over the TV, even if it is not on the primary monitor
v2.2.1.3 - added more instructions to the 'About' message box and extended the height of the volume slider
v2.2.1.4 - added display text to the bottom of the volume slider, shows current volume level
v2.2.1.5 - volume level is now saved to the INI file when User exits, and restored next time TV is opened
v2.2.1.6 - added 'Always on top' checkbox which lets User toggle the window between always on top or not
v2.2.1.7 - "Always on top" setting is now saved to INI, all dependency on COM removed by nimda
v2.2.1.8 - fixed a problem that was causing TV to crash when x64 users closed the TV
v2.2.1.9 - added splash screens so User knows when channels are loading and unloading during opening and exit
v2.2.2.0 - added 'Searching, please wait' text while User is searching for the nearest empty channel
v2.2.2.1 - added loading/closing/button sounds to the TV, reverted back to 9999 channels for compatibility
v2.2.2.2 - changed the text shown while downloading, it is white and displays under the Channel Title
v2.2.2.3 - replaced the TV sounds with wav files (instead of Mp3) for more compatibility
  Oct 2011
v2.2.2.4 - exit button (x) is greyed out while video is downloading, ensures better chance of completion
v2.2.2.5 - fixed a small bug which keeps the 'X' button disabled after a video is downloaded
v2.2.2.6 - updated AHK_L to v1.1.05.01 and Compile AHK to v0.9.1 then I compiled the TV using them
  Feb 2012
v2.2.2.7 - updated Garry's YouTube download code (YouTube changes their codes every once in a while)


Future plans:
Code:
- Make the 'Channel Up' and 'Channel Down' buttons go to the next occupied channel, skipping any empty channels on the way
- Integrate function to detect when video is finished playing, to enable the "Play All" option
- Provide "Always open TV on last channel viewed" option
- Reference downloaded videos from channel list, which may require a non-editable save location, probably in the Documents\Aaron's YouTube Television folder
- Aaron's YouTube Radio should be built

_________________
Some of my scripts :).


Last edited by aaronbewza on February 8th, 2012, 11:54 am, edited 136 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 4th, 2011, 5:53 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
Nice;
This is headed in the right direction!
:D

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 4th, 2011, 11:58 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You make great Gui's. :)
Two things:
1.) Make it possible to add another channel without editing the script in multiple places.
2.) Your "Button1:", "Button2:" etc labels are very redundant. Stack them and use A_ThisLabel to determine what to do (SubStr(A_ThisLabel, 7))

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 12:31 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
That's the best loading screen I've ever seen... I only wish it loaded something. It showed the snow, and then said loading when I pressed a button. The periods were animated but it never passed it. I gave it 30+ seconds.

Tested on Win 7 (SP1), WMM installed and a great internet connection.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 12:50 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
odd.. I have no thoughts on why that would be. The part that shows stuff from the net is shown on a created Internet Explorer control which shows on the GUI, maybe that has something to do with it in your case? I use Firefox for internet browsing but I still have IE on my system.

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 12:52 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
I just installed IE9 this boot. It should be compatible, so I might need a reboot for it to work.

If I figure it out, I'll let you know.

Update: No luck.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 1:24 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
ok go in the code and remove this (it will remove that loading gif entirely) :
Code:
<span class="fixed">
    <img src="http://i1207.photobucket.com/albums/bb474/aaronbewza/loading.gif" width="455" height="323">
  </span>

it's in the "CodeVariableChange" subroutine.

I hope that helps :)

This thing uses Windows Media Player (the embedded version)... but it's supposed to work in most of the newest versions from the last however many years. I couldn't be sure what else to suggest, perhaps your Windows Media Player is not listed in your firewall options.

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 1:30 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
I don't have all the includes, so I can't run the code. I used the .exe earlier.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2011, 2:13 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
no includes required, my friend. one of the functions is by Rseding91, it lets images get stored in the .ahk itself.

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 12:16 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
Updated to version 1.1.0.0 (links updated in first post, you DO need an included file now... URLlist.ini in your script directory)

Changes:
- lots of little code changes and optimizations
- volume slider control now works but only for YouTube videos (any help here would be awesome)
- added "Channel Up" and "Channel Down" buttons for flicking between videos (2 to 100)
- mapped "Arrow Left" and "Arrow Right" to "Channel Down" and "Channel Up" buttons
- filled first 24 channels with a variety of YouTube and embedded videos
- added "URLlist.ini" into script directory containing list of URLs you can customize yourself
("ahk-only" users, don't forget to download the included URLlist.ini in your script directory)

There are instructions in "URLlist.ini" how to add your own URLs...
please read carefully! It's not the easiest thing ever but it does work.

If anyone has suggestions, I'm all ears!

nimda wrote:
2.) Your "Button1:", "Button2:" etc labels are very redundant. Stack them and use A_ThisLabel to determine what to do (SubStr(A_ThisLabel, 7))

I'm working on this now, nimda, thanks for the props! :)

_________________
Some of my scripts :).


Last edited by aaronbewza on July 6th, 2011, 12:18 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 1:00 am 
Offline
User avatar

Joined: May 18th, 2010, 3:10 pm
Posts: 1179
Location: Sweden
Aron Bewza. I think you're onto something! This is totally great!

I am left without words. Not only is this a very cozy way of watching videos, I think an application that allows online videowatching like this, could become very popular. I'm getting an overflow of ideas here... sharing videos, playing youtube videos embedded here instead, "newcast", etc.

_________________
~sumon Appifyer AHK Nova halted Recommended: AHK_L (Why?)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 1:10 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
Thank you sumon... anything you can add, if you're interested, please feel free!
Remember to claim full credit for any additions or improvements you make so people don't
ask me for information on something that someone else has altered... I might not have the correct answer lol!

I think I like the idea of "security software" where the User
can patch in webcams from their house and make archives of images or have images
sent to his/her phone when motion is detected in the webcam's range...

Another idea is for the User to put all their uploaded family YouTube videos
(or whatever collection the User has) into this TV and then they can share it
with their family and friends.

EDIT: I will make a StringReplace for the "Share" URLs that YouTube offers under each video
(http://youtu.be/Video Number code here)! Then the correct video number
can be applied to a line in the .INI and I can then add a "Add Custom Channel" Input Box or something.

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 12:18 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
UPDATED to version 1.2.0.0 (links updated in top post)

Changes:
- added feature which allows you to program television with your own choices of YouTube videos, very easily, 999 assignable channels available, can use custom display names
... hence the name change to "YouTube Television".
- fixed "<<" and ">>" (channel down and up) button functions, now when you flick to a channel lower than 2, you are taken to 999 (and vice versa).
- added "!" button, you can enter your own channel number to jump to directly.
- added "?" (about) button which shows version number, build date, and instructions.
- "left arrow" and "right arrow" keys still change channels, but I forgot to put that in the instructions.

I think I'll make 13 images of a rotary knob in 13 stages of rotation, and assign them to show up
where the rotary channel-changer is located on the GUI, just for some visual kicks whn the User changes the channel.

NOTE! "ahk-only" users must use the new .INI file and it must go into a folder called
"YouTube Television" in your Documents folder. You may have to delete all your temp internet files
to be able to download the new one, I kept ending up with the old one until I cleared all my temp internet files.

NEW IDEA: I've noticed the vast amount of music collections on YouTube.
How about a User-programmable "YouTube Jukebox"? I could style it like a Wurlitzer.
Image

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 6:07 pm 
Offline

Joined: May 26th, 2011, 7:53 am
Posts: 237
Location: uk
I love the jukebox idea, lots of nice music videos on youtube. Would it just be for the sound?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2011, 7:02 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
No it would also show the CD cover...
For example, the following YouTube URL has a square CD cover on the screen:
http://www.youtube.com/watch?v=zaiLdF0R8w0

I would put a screen somewhere in the middle of the jukebox, and that would
display the CD cover art, if there is any.
This screen, of course, will also play music videos and the User will be able to make it fullscreen.
I'll also need to find a few animated GIFs
of the cool bubbles that were on the front of these things. And I'll add a text area somewhere
on the jukebox which will display information.
Perhaps I'll gear it so it will accept playlists and not only single songs. yah?

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 134 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Bon, bowen666, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group