Jump to content

Streaming Online Radio


 Share

Recommended Posts

all tested

$oMediaPlayer.status; connecting, buffering, playing...
$oMediaPlayer.versionInfo;(FileGetVersion)

$oMediaPlayer.PlayState
;Undefined = 0/Stopped = 1/Playing = 3
;Buffering = 6/Waiting = 7/Transitioning = 9/Ready = 10/Reconnecting = 11

$oMediaPlayer.OpenState
;Open = 13/Opening = 12/Connecting = 10/NoMedia = 6

$oMediaPlayNetwork=$oMediaPlayer.Network
$oMediaPlayNetwork.sourceProtocol
$oMediaPlayNetwork.receivedPackets
$oMediaPlayNetwork.lostPackets
$oMediaPlayNetwork.receptionQuality;0-100%
$oMediaPlayNetwork.bitRate
$oMediaPlayNetwork.bandWidth
$oMediaPlayMediaError=$oMediaPlayer.Error
$oMediaPlayMediaError.errorCount
I WANT THE TITLEINFO :whistle:
Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

did you dowload the gui.bmp?

This will run in script form without the bmp, but it should error if you try to compile to exe with out the bmp.

edit: typo

Edited by eltorro
Link to comment
Share on other sites

Ok,

finally got around to adding the ini add/delete func to the program.

It requires this new bitmap for the skin

gui_2.bmp

Get the file below:

Online_Radio_Jukebox.au3

Get the INI content from the previous post above.

In the delete dialog, select the station from the combo box and click delete.

DANGER WILL ROGERS: Once you click delete it is gone.

In the add dialog, Put the station name in the first box, and paste the full url into the second box.

At present there is not any url checking.

When I find some time later this week maybe it can get done.

Enjoy the updated version for now.

Edited by eltorro
Link to comment
Share on other sites

If I click the drop down menu arrow, I get no choices. after countless hours of smashing my head on the desk i realized i couldve just pressed the down arrow on my keyboard. I'm using win98 at the moment, does it work for you xp users?

Also as a suggestion: instead of having those buttons and the add/delete radio station stuff, it would look a little more organized if it were all in one menu at the top (i.e. file menu, ect.)

I'm working on adding some hotkeys for volume, stopping/playing, and closing the app (when your in games, etc.), and I'm going to try and add the top menu if no one else does (when I get some time). I'm also working on a way to get the script to use less memory.

Edited by Kardus
Link to comment
Share on other sites

Some examples to fix the problems you have.

Opt("OnExitFunc", "End")

HotKeySet("{MEDIA_STOP}", "Stop")
HotKeySet("{MEDIA_PLAY_PAUSE}", "Play")
HotKeySet("{F9}", "End")

$i_PID = @AUTOITPID

AdlibEnable("ReduceMemory", 5000)

Func _ReduceMemory($i_PID = -1)
    If $i_PID <> - 1 Then
        Local $ai_H = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
        Local $ai_R = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_H[0])
        DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_H[0])
    Else
        Local $ai_R = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
    EndIf
    Return $ai_R[0]
EndFunc

Func End()
    AdlibDisable()
Exit
EndFunc
Link to comment
Share on other sites

You may want to add two more hot keys in case the user doesn't have MEDIA_PLAY_PAUSE or MEDIA_STOP

Some examples..

what's the "$oMediaPlayControl" for pause?

What do you think? ;)
$oMediaPlayControl.pause

But remember, pause don't work very well on streamings.

Edited by Westi
Link to comment
Share on other sites

  • 4 weeks later...

So I'm working with the updated code...nice work by the way.

I haven't played much with RegEnum*, so I want to convert the INI file to reg keys and values. The script errors out though when I try to do this. Script and .reg file uploaded for viewing

Edit (10:46a): Fixed one bug, still doesn't work

streams.reg.txt

Online_Radio_Jukebox__Reg_.au3

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

Nevermind...a rewrite of a test script worked...now I just have to rename the variables...

Local $aValues[1], $x = 1
While 1
    $Key = RegEnumVal("HKCU\Software\Internet Radio\Streams", $x)
    If @error <> 0 Then ExitLoop
    ReDim $aValues[(UBound($aValues) + 1)]
    $aValues[0] = UBound($aValues) - 1
    $aValues[(UBound($aValues) - 1)] = $Key
    MsgBox(0, $Key, RegRead("HKCU\Software\Internet Radio\Streams", $Key))
    $x += 1
Wend
Return _ArrayToString($aValues, "|", 1, '')

Edit (11:02a): Uploaded working versions of Internet Radio w/ reg functionality. Zip archive with source and registry file containing URLs. May create function where if no values exist in folder, defaults to installing the set used now.

Edit (3:22p): Bug in stream list deletion. Updated zip attached

Internet_Radio.zip

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

  • 3 weeks later...

If I click the drop down menu arrow, I get no choices. after countless hours of smashing my head on the desk i realized i couldve just pressed the down arrow on my keyboard. I'm using win98 at the moment, does it work for you xp users?

Also as a suggestion: instead of having those buttons and the add/delete radio station stuff, it would look a little more organized if it were all in one menu at the top (i.e. file menu, ect.)

I'm working on adding some hotkeys for volume, stopping/playing, and closing the app (when your in games, etc.), and I'm going to try and add the top menu if no one else does (when I get some time). I'm also working on a way to get the script to use less memory.

For your information...

I changed the line $combo_name = GUICtrlCreateCombo("Choose your RadioStation", 13, 30, 153, 90)

the last value was 20 I think, this makes the combo not work in 2000, changing it to 90 it works fine, will perhaps solve the issue for some of you on earlier O/S as well

Cheers

Chris

Link to comment
Share on other sites

I can put a small if/then statement for the OS version if you wish. I [un]fortunately only have WIN_XP Home to test on, so I usually don't try to be very backwards-compatible with GUIs (I don't even like making GUIs in the first place).

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

  • 2 weeks later...

Some examples to fix the problems you have.

Opt("OnExitFunc", "End")

HotKeySet("{MEDIA_STOP}", "Stop")
HotKeySet("{MEDIA_PLAY_PAUSE}", "Play")
HotKeySet("{F9}", "End")

$i_PID = @AUTOITPID

AdlibEnable("ReduceMemory", 5000)

Func _ReduceMemory($i_PID = -1)
    If $i_PID <> - 1 Then
        Local $ai_H = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
        Local $ai_R = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_H[0])
        DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_H[0])
    Else
        Local $ai_R = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
    EndIf
    Return $ai_R[0]
EndFunc

Func End()
    AdlibDisable()
Exit
EndFunc
This might be really dumb (on my part obviously!) but _ReduceMemory() doesn't work on anything below 2000 (trust me) so you might want to put a check for that. Here's the quickest way I found to do that:

If StringInStr("WIN_ME|WIN_98|WIN_95", @OSVersion) Then

Returns True if someone is running any of these OSes...

I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!)

Link to comment
Share on other sites

  • 4 weeks later...

Ive tried to run the last 3 Internet Radio scripts posted in this thread and each time I get a script error: "Unable to parse Line nn"

In the last version the line is Line 17 and the carat for the error is under the "n" in .Enabled = true.

In the other versions the line numbers are different but the error is always pointing to "Enabled"

Im running version 3.1.1 of Autoit on Win2K.

Any suggestions?

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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