Kip Posted October 12, 2008 Posted October 12, 2008 Hi, (I dont have anything to say this time) Functions: _Youtube_Read($iID) _Youtube_GetID($sPlayer) _Youtube_GetTitle($sPlayer) _Youtube_GetDescription($sPlayer) _Youtube_GetKeywords($sPlayer) _Youtube_GetEmbedLink($sPlayer) _Youtube_GetPlayerLink($sPlayer) _Youtube_GetPlayerSwf($sPlayer) _Youtube_Create($iX, $iY, $iWidth=$YT_DEFAULTWIDTH, $iHeight=$YT_DEFAULTHEIGHT) _Youtube_Load($aPlayerControl, $sPlayer, $iAutoPlay=True) _Youtube_Stop($aPlayerControl) Example: Just enter a video ID and the UDF will to the rest expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <Youtube.au3> $GUI = GUICreate("YTPlayer",700,500) $iInput = GUICtrlCreateInput("6j7huh5Egew",480,50,115,23); 6j7huh5Egew is a cool song XD $iPlay = GUICtrlCreateButton("Play",600,50,90,23) $iLabel = GUICtrlCreateLabel("ID: " &@CRLF & _ "Title: " &@CRLF & _ "Description: " &@CRLF & _ "Keywords: " ,490,90,200,600) $aPlayerControl = _Youtube_Create(50,50) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit Case $iPlay $sID = GUICtrlRead($iInput) GUICtrlSetState($iPlay,$GUI_DISABLE) $sPlayer = _Youtube_Read($sID); Read webpage (could take a while) $sTitle = _Youtube_GetTitle($sPlayer) $sDescription = _Youtube_GetDescription($sPlayer) $sID = _Youtube_GetID($sPlayer) $sKeywords = _Youtube_GetKeywords($sPlayer) GUICtrlSetData($iLabel,"Title: "&$sTitle &@CRLF & _ "Description: "& $sDescription &@CRLF & _ "Keywords: "& $sKeywords &@CRLF&@CRLF& _ "ID: "&$sID) _Youtube_Load($aPlayerControl, $sPlayer) GUICtrlSetState($iPlay,$GUI_ENABLE) EndSwitch WEndYoutube.au3 MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
WeMartiansAreFriendly Posted October 12, 2008 Posted October 12, 2008 (edited) Looks good, I'd hate for Youtube to update their code and this broke (this happens all the time), another thing, It depends on two things Internet Explorer and Adobe Flash, which will fail if flash was disabled. Edited October 12, 2008 by mrRevoked Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
ludocus Posted November 5, 2008 Posted November 5, 2008 umm.. this doesn't work for me.. I have flash and Internet explorer.. It returns the title, description, webstie and keywords all fine.. but I just see a white screen..
torels Posted November 5, 2008 Posted November 5, 2008 (edited) I'd add a youtube download And a search anyway... very good job! Edited November 5, 2008 by torels Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now