z0mgItsJohn Posted November 27, 2009 Share Posted November 27, 2009 (edited) Playlist.com is a free website witch people use to create a HTML embedded playlist for.. MySpace, Facebook, etc... What this program allows you to do is download songs from Playlist.com witch is something you can't normally do.. also you don't even need an account.. just goto "http://www.playlist.com" search for a song, go through the list.. until you find the one your looking for and then beside the song you want there will be a "Visit link" hyperlink.. all you have to do is copy that link to your clipboard and the program will detect that.. process it and download the song. So here's the script: (Just run it.. find a song copy that link and it will download it.) * Also the execute button will run the song via your default media player. * The song name will be in the script drive.. (@ScriptDir) with the name "Song - Artist.mp3" expandcollapse popup#Include <GUIConstantsEx.Au3> #Include <WindowsConstants.Au3> #Include <String.Au3> Opt ('GUIOnEventMode', 1) ClipPut ('') $Temp = @TempDir & '\HTML_TEMP.TXT' If FileExists ($Temp) Then FileDelete ($Temp) $GUI = GUICreate ('Playlist.com Download v1.0', 344, 82) GUISetBkColor (0) GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit') $1 = GUICtrlCreateInput ('', 5, 5, 334, 20, 1) GUICtrlSetFont (-1, 9, 600, -1, 'Arial') GUICtrlSetState (-1, $GUI_DISABLE) $2 = GUICtrlCreateInput ('', 5, 30, 249, 20, 1) GUICtrlSetFont (-1, 9, 600, -1, 'Arial') GUICtrlSetState (-1, $GUI_DISABLE) ; $3 and $4 were removed. $5 = GUICtrlCreateButton ('Execute', 260, 30, 80, 20) GUICtrlSetOnEvent (-1, '_Execute') GUICtrlSetFont (-1, 9, 600, -1, 'Arial') GUICtrlSetState ($5, $GUI_DISABLE) $6 = GUICtrlCreateProgress (5, 56, 334, 20, 0x01) GUISetState (@SW_SHOW) WinSetOnTop ($GUI, '', 1) WinSetTrans ($GUI, '', 150) While 1 If StringInStr (ClipGet (), 'http://www.playlist.com/') <> 0 Then GUICtrlSetData ($1, '') GUICtrlSetData ($2, '') GUICtrlSetData ($6, 0) GUICtrlSetData ($1, 'Processing request, please wait...') INetGet (ClipGet (), $Temp) $Name = _StringBetween (FileReadLine ($Temp, 85), '<h3>','</h3>') $Name = StringReplace (StringReplace ($Name[0], '"',''), 'By','-') $File = $Name & '.mp3' $Host_URL = _StringBetween (FileReadLine ($Temp, 87), '<p>Located at: ','</p>') $Host_URL = $Host_URL[0] $Size = INetGetSize ($Host_URL) If $Size > 0 Then GUICtrlSetData ($1, 'Download in progress...') GUICtrlSetData ($2, $File) INetGet ($Host_URL, $File, 0, 1) GUICtrlSetState ($5, $GUI_DISABLE) Do $Math = Round ((@INetGetBytesRead / $Size) * 100, 0) GUICtrlSetData ($6, $Math) Sleep (15) Until @INetGetActive = 0 GUICtrlSetState ($5, $GUI_ENABLE) GUICtrlSetData ($1, 'Download complete!') Else GUICtrlSetData ($1, 'Fatal Error: File Size: "0 bytes" (Try another link.)') EndIf ClipPut ('') FileDelete ($Temp) EndIf Sleep (15) WEnd Func _Execute () ShellExecute (@ScriptDir & '\' & $File) EndFunc Func _Exit () Exit EndFunc Feel free to report bugs.. or ask questions.. - John Edited November 28, 2009 by John09 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted November 28, 2009 Author Share Posted November 28, 2009 Update: Turned it into a GUI with a progress bar and such, and added a better description. Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 2, 2009 Author Share Posted December 2, 2009 Well has anyone tried it? If so did it work? Do you like it? Comments please! Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
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