Foxhound Posted September 8, 2010 Posted September 8, 2010 (edited) AutoIt Version: 3.3.6.1 Author: Foxhound Script Function: After a few weeks of tinkering with the .977 Player, I recreated the whole script and added several new functions. So much so that I had to release it as a completely different script This script is an Internet Radio Player that allows you to tune into several different internet radio stations All of the stations are based on Shoutcast. Features: * Automatically fetch Lyrics and Cover data to currently playing music(if it's a music station) * Select seven different radio stations to tune into ( more to come) * Get artist and song name of currently playing song Basics of what this script does: Choose a station ---> Create object, Embed flash player ----> Create another object, go to station's shoutcast website and pull 'now playing' song info ---> put that song into getLyrics() which will use Chart Lyrics website to return XML data containing link to cover art and the actual lyrics which are parsed and displayed onto a GUI. Rinse and Repeat. -Issues - *Even with _IEQuit, the ieObj and metaObj may still linger. I've added a warning if it does happen. *This script may not work for people outside the U.S.(Shoutcast's copyright laws and such) - Changelog - - v.0.1 *Recreated the lyrics GUI *Removed auto music data feature *Fixed IeOBJ and metaObj lingering after script closing *Cleaned up getLyrics() functions - v.1.0 *Completely New Lyrics GUI *Changed script name from .977 player to Internet Radio *Multiple radio stations with its own GUI - Soon to come - *New update feature. INI support to handle URL's and other music data(see code below). Since the links might become out-of-date, new function will allow the player to update itself by downloading an update.ini file *Sound Mute/Volume functions *Manual song search and stream(search for a song, and play it) -v.1.1 *Removed Hotkeys *Added New Tray Menu to replace hotkeys *Fixed - getTitle() stuck in loop if called without a correct/no URL *Small changes to _Station() function Let me know if you have any questions or comments. Download: Internet Radio Player v1.1 - Stable.au3 Edited September 10, 2010 by Foxhound [quote]Quick YouTube To MP3 | Lyrics Finder | Internet Radio Player | GetWeather | TinyURLifier[/quote]
nend Posted September 8, 2010 Posted September 8, 2010 (edited) Why so difficult?? Why don’t you just use “ObjCreate("WMPlayer.OCX.7")” to play the radiostations? You used IE object to get the metadata but IE not al go’s wel with everyone. This function makes more sense to get the data. Func _get_metadata($link) $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $obron = ObjCreate("Microsoft.XMLHTTP") $obron.Open("GET", $link, 0) $obron.Send $bronstring = $obron.responseText If StringInStr($bronstring, "SHOUTcast Server") Then $splitarray = stringsplit($bronstring, "<td ", 1) For $i=1 to $splitarray[0] If StringInStr($splitarray[$i], "Current Song:") Then $titlesong = StringRegExp($splitarray[$i], '<(?i)b>(.*?)</(?i)b>', 3) ExitLoop EndIf Next Return $titlesong[0] Else Return "0" EndIf EndFunc Func MyErrFunc() EndFunc Edited September 8, 2010 by nend
wakillon Posted September 8, 2010 Posted September 8, 2010 Thanks FoxHound it work fine ! A little tray menu could be cool... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Foxhound Posted September 10, 2010 Author Posted September 10, 2010 (edited) who i can put more station?I'm working on an easy to edit INI file to add more radio stations.I've also added tray menu in the next version and will take out the hotkeysYou used IE object to get the metadata but IE not al go’s wel with everyone.Yeah I know. But I am still learning AutoIT and programming so I haven't learned how to properly access the COM objects. But I'll try to implement your functions once I figure about how to properly use com objects in AutoIT. Edited September 10, 2010 by Foxhound [quote]Quick YouTube To MP3 | Lyrics Finder | Internet Radio Player | GetWeather | TinyURLifier[/quote]
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