Mosquitos Posted August 29, 2005 Posted August 29, 2005 I have now this but can someone help me with the load function please. For playing music that is already on my computer. expandcollapse popup#include <GuiConstants.au3> FileInstall("C:\close.bmp", @TempDir & "\close.bmp",1) $Close = @TempDir & "\close.bmp" $oMyError = ObjEvent("AutoIt.Error","Quit") $oMediaplayer = ObjCreate("WMPlayer.OCX.7") If Not IsObj($oMediaplayer) Then Exit $oMediaplayer.Enabled = true $oMediaplayer.WindowlessVideo= true $oMediaPlayer.UImode="invisible" $oMediaPlayControl=$oMediaPlayer.Controls $oMediaPlaySettings=$oMediaPlayer.Settings GuiCreate("Online Radio Jukebox", 215, 140, 1, 1, BitOR($WS_POPUP,$WS_DLGFRAME),$WS_EX_TOPMOST) GuiCtrlCreateLabel("Online Radio Jukebox", 55, 10, 200, 20) GUICtrlSetColor(-1, 0xff0000) $combo_name = GuiCtrlCreateCombo("", 20, 30, 175, 20) GuiCtrlSetData($combo_name, "Real Rock 101.1|Studio Brussel|Donna|Q-Music|4Fm|Contact|C-Dance|TopRadio|SkyRadio|Tmf|Noordzee|Veronica|BNN-Fm|Be-One|Oradio") $Volume = GuiCtrlCreateSlider( 17,110, 180, 20) GuiCtrlCreateLabel("Volume", 85, 95, 40, 20) GUICtrlSetColor(-1, 0xff) $VolLevel = $oMediaPlaySettings.Volume GUICtrlSetData($Volume, $VolLevel) $Play = GuiCtrlCreateButton("Play", 30, 60, 50, 25) $Stop = GuiCtrlCreateButton("Stop", 80, 60, 50, 25) $Load = GUICtrlCreateButton("Load", 130, 60, 50, 25) $Cancel = GUICtrlCreateButton("Exit", 195, 0, 20, 20, $BS_BITMAP) GUICtrlSetImage(-1, $Close) GUICtrlSetTip(-1,"Exit") GuiSetState() HotKeySet("{F8}", "Hide") HotKeySet("{F9}", "Show") While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $combo_name $Radio = GuiCtrlRead($combo_name) If $Radio = "Real Rock 101.1" Then $oMediaPlayer.URL="http://players.eonstreams.com/FastAim/Player/Play.php?PulseID=14908515&SecurityKey=5553" EndIf If $Radio = "Studio Brussel" Then $oMediaPlayer.URL="mms://streampower.belgacom.be/stubruhigh" EndIf If $Radio = "Donna" Then $oMediaPlayer.URL="mms://streampower.belgacom.be/donnahigh" EndIf If $Radio = "Q-Music" Then $oMediaPlayer.URL="http://www.q-music.be/asx/phpasx/qahi.asx" EndIf If $Radio = "4Fm" Then $oMediaPlayer.URL="mms://wm.streampower.be/4fm" EndIf If $Radio = "Contact" Then $oMediaPlayer.URL="mms://mediaserver02.cybernet.be/contactnl" EndIf If $Radio = "C-Dance" Then $oMediaPlayer.URL="http://www.c-dance.be/stream_high.asx" EndIf If $Radio = "TopRadio" Then $oMediaPlayer.URL="http://www.topradio.be/new/website/topradioHigh.asx" EndIf If $Radio = "SkyRadio" Then $oMediaPlayer.URL="http://cinecast.capcave.com/streams/SkyRadio/SkyRadio.asx" EndIf If $Radio = "Tmf" Then $oMediaPlayer.URL="http://stream.tmf.nl/asx/tmf_audio.asp" EndIf If $Radio = "Noordzee" Then $oMediaPlayer.URL="mms://hollywood.win2k.vuurwerk.nl/noordzee" EndIf If $Radio = "Veronica" Then $oMediaPlayer.URL="http://cinecast.capcave.com/streams/RadioVeronica/RadioVeronica.asx" EndIf If $Radio = "BNN-Fm" Then $oMediaPlayer.URL="http://wmplayer.bnn.fm" EndIf If $Radio = "Be-One" Then $oMediaPlayer.URL="http://www.beoneradio.be/modules/desktop/streaming/asx.aspx?sid=1" EndIf If $Radio = "Oradio" Then $oMediaPlayer.URL="http://www.oradio.be/stream/livestream.asx" EndIf opt("TrayMenuMode", 1) opt("TrayOnEventMode", 1) $show_tray = TrayCreateItem ("Show |Online Radio Jukebox|F9|") TrayItemSetOnEvent (-1, "Show") TrayCreateItem ("") $hide_tray = TrayCreateItem ("Hide |Online Radio Jukebox|F8|") TrayItemSetOnEvent (-1, "Hide") TrayCreateItem ("") $exit_tray = TrayCreateItem ("Exit |Online Radio Jukebox|") TrayItemSetOnEvent (-1, "_Exit") TraySetState () Case $msg = $Cancel $oMediaPlayControl.Stop Exit Case $msg = $Load Case $msg = $Play $oMediaPlayControl.Play Case $msg = $Stop $oMediaPlayControl.Stop Case Else If GUICtrlread($Volume) <> $VolLevel Then $oMediaPlaySettings.Volume = GUICtrlRead($Volume) $VolLevel = GUICtrlRead($Volume) EndIf EndSelect WEnd Func Hide() GUISetState(@SW_HIDE) EndFunc Func Show() GUISetState(@SW_SHOW) EndFunc Func _Exit() Exit EndFunc Case $msg = $Load ............................... Sapiente vince, rex, noli vincere ferro!
Westi Posted August 30, 2005 Posted August 30, 2005 (edited) Add this in the while loop: Case $msg = $Load $media = FileOpenDialog("Offline Radio Jukebox", "::{450D8FBA-AD25-11D0-98A8-0800361B1103}", "Media (*.wma;*.mp3)" ,1) $oMediaPlayer.URL = $media And check code for the tray !! Place:opt("TrayMenuMode", 1) opt("TrayOnEventMode", 1) in the first lines. Edited August 30, 2005 by Westi
Mosquitos Posted August 30, 2005 Posted August 30, 2005 (edited) This is the code now... And the close.bmp file include. Westi thanks.... I take this {20D04FE0-3AEA-1069-A2D8-08002B30309D} because then if you press load the script is always going to the last map you open before. Is it also possible to show the mp3 your playing?Online_Radio_Jukebox.au3 Edited August 30, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Westi Posted August 30, 2005 Posted August 30, 2005 Is it also possible to show the mp3 your playing?You mean title, bandwith and so on... That's the question!
Valuater Posted August 30, 2005 Posted August 30, 2005 (edited) Nice original script MSLx Fanboy and... Nice additions Mosquitos 8) Edited August 30, 2005 by Valuater
Mosquitos Posted August 30, 2005 Posted August 30, 2005 (edited) You mean title, bandwith and so on... That's the question! <{POST_SNAPBACK}>Yes thats what i mean :">The title only is oke.Is it possible to show the title in the combo? Edited August 30, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Mosquitos Posted August 30, 2005 Posted August 30, 2005 Nice original originally MSLx Fanboyand... Nice additions Mosquitos 8)<{POST_SNAPBACK}>Thanks valuater but you made the gui and the traycode is from your messenger Sapiente vince, rex, noli vincere ferro!
MSLx Fanboy Posted August 31, 2005 Author Posted August 31, 2005 (edited) As for mp3 characteristics, did LazyCat write a DLL for getting header information from mp3 files?I currently can't connect to his homepage, but I believe that he might have something.Edit: I too enjoy the scripts you guys have been cranking out, I've been very busy lately, and haven't had much time to tinker with my scripts. Keep it up, I might just dump mine in favor of yours Edited August 31, 2005 by MSLx Fanboy Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Mosquitos Posted September 2, 2005 Posted September 2, 2005 (edited) New Radio with help from other people(Holger,Westi,Valuater, MSLx Fanboy, etc) Thanks Thanks to eJan for the tranparent_gui.Online_Radio_Jukebox.rar Edited September 2, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Hooch Posted September 2, 2005 Posted September 2, 2005 Hmm looks sexy but on my system the combo box doesn't load any values. V 3.1.1.72
theguy0000 Posted September 2, 2005 Posted September 2, 2005 from the code right from thefirst post in the thread: C:\Documents and Settings\hp\My Documents\AutoIt\radio.au3 (54) : ==> Variable used without being declared.: $oMediaPlayControl.Stop ^ ERROR The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
Mosquitos Posted September 2, 2005 Posted September 2, 2005 (edited) Hmm,thats strange. It works fine by me and i have also the latest beta(72) He gives no errors.gui.bmpOnline_Radio_Jukebox.au3 Edited September 2, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Hooch Posted September 2, 2005 Posted September 2, 2005 The download in your sig now is a lot bigger, I tried it, I now have the "choose your radio station" text in the combo but no actual station list.
Mosquitos Posted September 2, 2005 Posted September 2, 2005 (edited) The download in your sig now is a lot bigger, I tried it, I now have the "choose your radio station" text in the combo but no actual station list.<{POST_SNAPBACK}>Do you have a arrow in your combobox?Do you have XP? Edited September 2, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro!
Hooch Posted September 2, 2005 Posted September 2, 2005 Ahh that must be it, I'm running 2K, I didn't notice the XP requirement
Valuater Posted September 2, 2005 Posted September 2, 2005 your latest is script looking good.... now you can start writting "skins" lol 8)
Mosquitos Posted September 2, 2005 Posted September 2, 2005 your latest is script looking good....now you can start writting "skins"lol8)<{POST_SNAPBACK}>I was thinking that it gonna be cool to make a mediaplayer with your radiopicture that you use in your XPClean Sapiente vince, rex, noli vincere ferro!
Valuater Posted September 2, 2005 Posted September 2, 2005 I was thinking that it gonna be cool to make a mediaplayer with your radiopicture that you use in your XPClean <{POST_SNAPBACK}>Cool..... can't wait to see it8)if you need the bmp, just let me know (i think its on the this site though)
eltorro Posted September 3, 2005 Posted September 3, 2005 (edited) Cool script!I changed the combo event func to use Select instead of all the if then endifs.I'm thinking of adding an ini or xml file that can be parsed at startup to load the combo list from. It wouldn't be too much trouble after that to add an edit func for the list.. Unless all this has already been done of course.Edit: New bitmapGet the bitmap gui_2.bmpEdit: Now reads from ini in script dir. Todo- add gui to edit ini.EDIT: add/delete funcs addedOnline_Radio_Jukebox.au3Here's the INI file. Name it orj.ini and save in script dir.[Real Rock 101.1] URL=http://players.eonstreams.com/FastAim/Player/Play.php?PulseID=14908515&SecurityKey=5553 [Studio Brussel] URL=mms://streampower.belgacom.be/stubruhigh [Donna] URL=mms://streampower.belgacom.be/donnahigh [Q-Music] URL=http://www.q-music.be/asx/phpasx/qahi.asx [4Fm] URL=mms://wm.streampower.be/4fm [Contact] URL=mms://mediaserver02.cybernet.be/contactnl [C-Dance] URL=http://www.c-dance.be/stream_high.asx [TopRadio] URL=http://www.topradio.be/2005/topradio.asx [SkyRadio] URL=http://cinecast.capcave.com/streams/SkyRadio/SkyRadio.asx [Tmf] URL=http://stream.tmf.nl/asx/tmf_audio.asp [Noordzee] URL=mms://hollywood.win2k.vuurwerk.nl/noordzee [Veronica] URL=http://cinecast.capcave.com/streams/RadioVeronica/RadioVeronica.asx [BNN-Fm] URL=http://wmplayer.bnn.fm [Be-One] URL=http://www.beoneradio.be/modules/desktop/streaming/asx.aspx?sid=1 [Oradio] URL=http://www.oradio.be/stream/livestream.asx [Colorado] URL=http://www.cpr.org/listen/live_classical.asx?classicalwebcast.comEdit: updated links Edited September 5, 2005 by eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code
MSLx Fanboy Posted September 4, 2005 Author Posted September 4, 2005 Hehe. It makes my heart go weak due to the fact that Real Rock 101.1 is still on the list, and on top of that, at the top! Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
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