Jump to content

Recommended Posts

Posted

I have now this but can someone help me with the load function please.

For playing music that is already on my computer.

#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!

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (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 by Westi
Posted (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 by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Posted (edited)

You mean title, bandwith and so on... That's the question!  :whistle:

<{POST_SNAPBACK}>

Yes thats what i mean :">

The title only is oke.

Is it possible to show the title in the combo?

Edited by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Posted

Nice original originally MSLx Fanboy

and... Nice additions Mosquitos

8)

<{POST_SNAPBACK}>

Thanks valuater but you made the gui and the traycode is from your messenger :whistle:

Sapiente vince, rex, noli vincere ferro!

Posted (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 :whistle:

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

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

Posted

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.

Posted (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 by Mosquitos

Sapiente vince, rex, noli vincere ferro!

Posted

your latest is script looking good....

now you can start writting "skins"

lol

8)

<{POST_SNAPBACK}>

I was thinking that it gonna be cool to make a mediaplayer with your radiopicture that you use in your XPClean :whistle:

Sapiente vince, rex, noli vincere ferro!

Posted

I was thinking that it gonna be cool to make a mediaplayer with your radiopicture that you use in your XPClean  :whistle:

<{POST_SNAPBACK}>

Cool..... can't wait to see it

8)

if you need the bmp, just let me know (i think its on the this site though)

NEWHeader1.png

Posted (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 bitmap

Get the bitmap gui_2.bmp

Edit: Now reads from ini in script dir. Todo- add gui to edit ini.

EDIT: add/delete funcs added

Online_Radio_Jukebox.au3

Here'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.com

Edit: updated links

Edited by eltorro
Posted

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! :dance::whistle:

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...