rambo3889 Posted June 15, 2006 Share Posted June 15, 2006 (edited) hey For some few days ago i was sitting with my pc and heared music from Radioblogclub.com but my parents were angry because it took some of their internet. So i tryed to download some music with a p2p program but that took like a half hour for 3 mbs. So i thought that there must be a way to download music from radioblogclub and so i found a way but it was a way that took time so i made this program to search for music. See the php files that says were the music files are located and then add it to a downloader. I dont know why but the buttons will not show up before you had been in another tab than the start up tab RQ=Ie 6 or later and Beta All comments are welcome and please report any bugs. suggestions are welcome expandcollapse popup#include <GUIConstants.au3> Global $lastinputdata = "" Global $adress_1 = "" Global $autodownloadsetting = 0;0 = not auto download 1= autodownload if input data change Local $Width = @DesktopWidth / 2 $radio = ObjCreate("Shell.Explorer.2") $php = ObjCreate("Shell.Explorer.2") GUICreate("Radioblogclub viewer and downloader", @DesktopWidth, @DesktopHeight, 0, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUICtrlCreateTab(10, 0, @DesktopWidth - 10, @DesktopHeight) $radiotab = GUICtrlCreateTabItem("Radioblogclub") $radioguiobj = GUICtrlCreateObj($radio, 12, 25, 1005, 656) $backinradio = GUICtrlCreateButton("Back", 300, @DesktopHeight - 88, 100, 25) $getintophp = GUICtrlCreateButton("&Put in the php Tab", 400, @DesktopHeight - 88, 100, 25) $fwinradio = GUICtrlCreateButton("Forward", 500, @DesktopHeight - 88, 100, 25) $help=GUICtrlCreateButton("Help",200, @DesktopHeight - 88,100,25) $phptab = GUICtrlCreateTabItem("Php") $phpguiobj = GUICtrlCreateObj($php, 12, 25, 1005, 656) $getintodwtab = GUICtrlCreateButton("P&ut it the download tab", 450, @DesktopHeight - 88, 200, 25) $label_php=GUICtrlCreateLabel("",100,@DesktopHeight - 88,325) $downloadertab = GUICtrlCreateTabItem("Downloadertab") $label_status = GUICtrlCreateLabel("", 12, 25, 200) $input = GUICtrlCreateInput("", 12, 40, 800, 20) $dw = GUICtrlCreateButton("Download", 812, 40, 90, 20) $seekplace=GUICtrlCreateButton("",812,80 ,90,20 , $BS_ICON) GUICtrlSetImage (-1, "shell32.dll",209) GUICtrlCreateLabel("Place on pc to download", 12, 60) $place_input = GUICtrlCreateInput("C:\", 12, 80, 800, 20) $autodownload = GUICtrlCreateCheckbox("Auto Download when you press Download in the php tab", 12, 100) GUISetState() $radio.navigate ("http://www.radioblogclub.com") $php.navigate ("about:blank") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $backinradio $radio.GoBack Case $msg = $fwinradio $radio.GoForward Case $msg = $getintophp getphp(ClipGet()) Case $msg = $getintodwtab putindwtab(ClipGet()) Case $msg = $dw preparedownload(GUICtrlRead($input)) Case $msg = $seekplace $folderselect=FileSelectFolder("Select a folder","C:\",5) if @error Then MsgBox(0,"","no folder selected") Else GUICtrlSetData($place_input,"") GUICtrlSetData($place_input,$folderselect&"\") EndIf Case $msg = $help MsgBox(0,"Help","This program is designed for downloading music from Radioblogclub.com"& _ "How it works Run the program go in the php tab and back in the radioblogclub tab now the buttons are under the object" & _ "(I dont know why they dont show up at start.). Seek for your song and when you found it right-click on the link and press copy shortcut" & _ "and then press the button Put into php in the php you found the song copy the link and press put in download tab") EndSelect ;Check the checkbox If BitAND(GUICtrlRead($autodownload), $GUI_CHECKED) = $GUI_CHECKED Then Local $autodownloadsetting = 1 Else Local $autodownloadsetting = 0 EndIf ;Check the input If GUICtrlRead($input) <> $lastinputdata Then Local $lastinputdata = GUICtrlRead($input) If $autodownloadsetting = 1 Then preparedownload($lastinputdata) EndIf EndIf WEnd Func preparedownload($path) $sr = StringRight($path, 4) If $sr <> ".rbs" Then $msgbox = MsgBox(4, "", "The file you will download is not a .rbs file" & @CRLF & "Do you still want to download the file?") If $msgbox = 6 Then $split1 = StringSplit($path, "/") Local $a1 = $split1[0] $split2 = StringSplit($split1[$a1], ".") $name = $split2[1] $file = $split2[2] If GUICtrlRead($place_input) = "" Then Downloadnow($path, "C:\", $name, $file) Else Downloadnow($path, GUICtrlRead($place_input), $name, $file) EndIf EndIf Else ;Now we know that the is if that the file is a rbs file. $split1 = StringSplit($path, "/") Local $a1 = $split1[0] $split2 = StringSplit($split1[$a1], ".") $name = $split2[1] $file = $split2[2] If GUICtrlRead($place_input) = "" Then Downloadnow($path, "C:\", $name, $file) Else Downloadnow($path, GUICtrlRead($place_input), $name, $file) EndIf EndIf EndFunc;==>preparedownload Func Downloadnow($path, $place, $name, $extion) If $extion = "rbs" Then Local $extions = "mp3" Else Local $extions = $extion EndIf GUICtrlSetData($label_status, "Download started") InetGet($path, $place & $name & "." & $extions) GUICtrlSetData($label_status, "Download Finished") EndFunc;==>Downloadnow Func getphp($startadress) Local $errorvalid = 0 Global $adress_1;Contains the adress with removed both Global $adress_2;Contains the adress with removed the auto play but still javascript in it Local $startadresslen = StringLen($startadress) $st = StringSplit($startadress, "?autoplay", 1) If @error Then MsgBox(0, "", "The address isnt a valid radioblogclub") Local $errorvalid = 1 Else Local $adress_2 = $st[1] EndIf If $adress_2 <> "" Then ;Okay the first part have been removed but now the second $st1 = StringSplit($adress_2, "'", 1) Local $adress_1 = $st1[2] & "sounds/playlist.php" EndIf $php.navigate ($adress_1) GUICtrlSetData($label_php,$adress_1) EndFunc;==>getphp Func putindwtab($path) ;In this func we need to find out how the page links to the .rbs file i know 2 ways ;1: http://domain.com/radio.blog/sounds/file.rbs ;2:sounds/file.rbs $stringleft=StringLeft($path,4) if $stringleft = "http" Then;Now we know that it links directly to the file like example 1 GUICtrlSetData($input,"") GUICtrlSetData($input,$path) Else $phpadress=GUICtrlRead($label_php) $len = StringLeft($phpadress,StringLen($phpadress)-19) GUICtrlSetData($input,"") GUICtrlSetData($input,$len&$path) EndIf EndFunc Edited June 15, 2006 by rambo3889 My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 15, 2006 Moderators Share Posted June 15, 2006 Your coding is getting alot nicer rambo... might want to throw some error handling in those functions Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
rambo3889 Posted June 15, 2006 Author Share Posted June 15, 2006 Dont understand what do you mean ? My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
Daniel W. Posted June 15, 2006 Share Posted June 15, 2006 Errorhandling means something like this. Func _min ( $x , $y ) If not isNumber( $x ) or not isnumber( $y ) THen Seterror(1) Endif Endfunc --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Link to comment Share on other sites More sharing options...
rambo3889 Posted June 15, 2006 Author Share Posted June 15, 2006 Okay understand now thanks My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
rambo3889 Posted June 22, 2006 Author Share Posted June 22, 2006 New version were the buttons are show at startup expandcollapse popup#include <GUIConstants.au3> Global $lastinputdata = "" Global $adress_1 = "" Global $autodownloadsetting = 0;0 = not auto download 1= autodownload if input data change Local $Width = @DesktopWidth / 2 $radio = ObjCreate("Shell.Explorer.2") $php = ObjCreate("Shell.Explorer.2") GUICreate("Radioblogclub viewer and downloader", @DesktopWidth, @DesktopHeight, 0, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUICtrlCreateTab(10, 0, @DesktopWidth - 10, @DesktopHeight) $radiotab = GUICtrlCreateTabItem("Radioblogclub") $radioguiobj = GUICtrlCreateObj($radio, 12, 25, 1005, 656) $backinradio = GUICtrlCreateButton("Back", 300, @DesktopHeight - 88, 100, 25) GUICtrlSetState(-1,$GUI_SHOW) $getintophp = GUICtrlCreateButton("&Put in the php Tab", 400, @DesktopHeight - 88, 100, 25) GUICtrlSetState(-1,$GUI_SHOW) $fwinradio = GUICtrlCreateButton("Forward", 500, @DesktopHeight - 88, 100, 25) GUICtrlSetState(-1,$GUI_SHOW) $help=GUICtrlCreateButton("Help",200, @DesktopHeight - 88,100,25) GUICtrlSetState(-1,$GUI_SHOW) $phptab = GUICtrlCreateTabItem("Php") $phpguiobj = GUICtrlCreateObj($php, 12, 25, 1005, 656) $getintodwtab = GUICtrlCreateButton("P&ut it the download tab", 450, @DesktopHeight - 88, 200, 25) $label_php=GUICtrlCreateLabel("",100,@DesktopHeight - 88,325) $downloadertab = GUICtrlCreateTabItem("Downloadertab") $label_status = GUICtrlCreateLabel("", 12, 25, 200) $input = GUICtrlCreateInput("", 12, 40, 800, 20) $dw = GUICtrlCreateButton("Download", 812, 40, 90, 20) $seekplace=GUICtrlCreateButton("",812,80 ,90,20 , $BS_ICON) GUICtrlSetImage (-1, "shell32.dll",209) GUICtrlCreateLabel("Place on pc to download", 12, 60) $place_input = GUICtrlCreateInput("C:\", 12, 80, 800, 20) $autodownload = GUICtrlCreateCheckbox("Auto Download when you press Download in the php tab", 12, 100) GUISetState() $radio.navigate ("http://www.radioblogclub.com") $php.navigate ("about:blank") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $backinradio $radio.GoBack Case $msg = $fwinradio $radio.GoForward Case $msg = $getintophp getphp(ClipGet()) Case $msg = $getintodwtab putindwtab(ClipGet()) Case $msg = $dw preparedownload(GUICtrlRead($input)) Case $msg = $seekplace $folderselect=FileSelectFolder("Select a folder","C:\",5) if @error Then MsgBox(0,"","no folder selected") Else GUICtrlSetData($place_input,"") GUICtrlSetData($place_input,$folderselect&"\") EndIf Case $msg = $help MsgBox(0,"Help","This program is designed for downloading music from Radioblogclub.com"& _ "How it works Run the program go in the php tab and back in the radioblogclub tab now the buttons are under the object" & _ "(I dont know why they dont show up at start.). Seek for your song and when you found it right-click on the link and press copy shortcut" & _ "and then press the button Put into php in the php you found the song copy the link and press put in download tab") EndSelect ;Check the checkbox If BitAND(GUICtrlRead($autodownload), $GUI_CHECKED) = $GUI_CHECKED Then Local $autodownloadsetting = 1 Else Local $autodownloadsetting = 0 EndIf ;Check the input If GUICtrlRead($input) <> $lastinputdata Then Local $lastinputdata = GUICtrlRead($input) If $autodownloadsetting = 1 Then preparedownload($lastinputdata) EndIf EndIf WEnd Func preparedownload($path) $sr = StringRight($path, 4) If $sr <> ".rbs" Then $msgbox = MsgBox(4, "", "The file you will download is not a .rbs file" & @CRLF & "Do you still want to download the file?") If $msgbox = 6 Then $split1 = StringSplit($path, "/") Local $a1 = $split1[0] $split2 = StringSplit($split1[$a1], ".") $name = $split2[1] $file = $split2[2] If GUICtrlRead($place_input) = "" Then Downloadnow($path, "C:\", $name, $file) Else Downloadnow($path, GUICtrlRead($place_input), $name, $file) EndIf EndIf Else ;Now we know that the is if that the file is a rbs file. $split1 = StringSplit($path, "/") Local $a1 = $split1[0] $split2 = StringSplit($split1[$a1], ".") $name = $split2[1] $file = $split2[2] If GUICtrlRead($place_input) = "" Then Downloadnow($path, "C:\", $name, $file) Else Downloadnow($path, GUICtrlRead($place_input), $name, $file) EndIf EndIf EndFunc;==>preparedownload Func Downloadnow($path, $place, $name, $extion) If $extion = "rbs" Then Local $extions = "mp3" Else Local $extions = $extion EndIf GUICtrlSetData($label_status, "Download started") InetGet($path, $place & $name & "." & $extions) GUICtrlSetData($label_status, "Download Finished") EndFunc;==>Downloadnow Func getphp($startadress) Local $errorvalid = 0 Global $adress_1;Contains the adress with removed both Global $adress_2;Contains the adress with removed the auto play but still javascript in it Local $startadresslen = StringLen($startadress) $st = StringSplit($startadress, "?autoplay", 1) If @error Then MsgBox(0, "", "The address isnt a valid radioblogclub") Local $errorvalid = 1 Else Local $adress_2 = $st[1] EndIf If $adress_2 <> "" Then ;Okay the first part have been removed but now the second $st1 = StringSplit($adress_2, "'", 1) Local $adress_1 = $st1[2] & "sounds/playlist.php" EndIf $php.navigate ($adress_1) GUICtrlSetData($label_php,$adress_1) EndFunc;==>getphp Func putindwtab($path) ;In this func we need to find out how the page links to the .rbs file i know 2 ways ;1: http://domain.com/radio.blog/sounds/file.rbs ;2:sounds/file.rbs $stringleft=StringLeft($path,4) if $stringleft = "http" Then;Now we know that it links directly to the file like example 1 GUICtrlSetData($input,"") GUICtrlSetData($input,$path) Else $phpadress=GUICtrlRead($label_php) $len = StringLeft($phpadress,StringLen($phpadress)-19) GUICtrlSetData($input,"") GUICtrlSetData($input,$len&$path) EndIf EndFunc My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
jaenster Posted July 20, 2006 Share Posted July 20, 2006 Rambo , this is cool. But there is a update YOu know the <Siteaddres>/sounds/playlist.php file? -jaenster Link to comment Share on other sites More sharing options...
AzKay Posted July 22, 2006 Share Posted July 22, 2006 I may be abit late, but, you just look at the source, open up the link in a download manager then rename it to .mp3, and it works fine =P, But your way is probly alot better. Ill try it now # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
rambo3889 Posted July 23, 2006 Author Share Posted July 23, 2006 @azkay Yes i know that way that was the first way i downloaded from radioblogclub and surely it is possible My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! 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