Scripting help - Please!

Hi, I'm trying to write a script where it runs a check against the currently playing .mp3 filename in Winamp, then has a text box object open a .txt file with the same filename from a designated folder (lyrics)

I'm trying to make a lyrics window in DesktopX, and have a folder full of my Lyrics files from a plug-in for Winamp (Leo'sLyrics). I what I'm trying to do, and have looked at the Scripts for similar objects, but can't for the life of me compile it into a rational script.

Can anyone help? It's starting to make my head hurt just thinking about it now, and I can't any documentation on scripting this.
1,016 views 3 replies
Reply #1 Top
There are a number of steps to such a process--which ones are giving you trouble? I can't be a whole lot of help as I haven't scripted for working with WinAmp, but maybe can offer some suggestions.

First you'll need to retrieve the information about the currently playing track. You say a .txt file with the same filename (I assume you mean excluding the extension), but is that really the information you want to get from WinAmp? I would think the filenames could be in any number of formats, and that the track title from the mp3 tags would be of more use. But maybe you got that covered. In any case, can you get the info you need from winamp?

Next you'll need to find the corresponding text file. Again the specifics will be determined by your situation--it sounds like you have all the lyrics in a single folder. But what if you wanted the lyrics in the same folder as the mp3? Or if you wanted to organize your lyric files into sub-folders? Should your widget be able to handle these cases?

Once you've found a text file you can read it as a string and then display it in any manner you wish.

One thing for sure, you'll be using the File System Object a lot as you find and read your text files. Here is a great list of samples, which you can pick and choose relevant bits from:

http://www.microsoft.com/technet/scriptcenter/scripts/misc/text/default.mspx

Good luck, sounds like a neat project.
Reply #2 Top
Winamp is a really poor program to pull track info from, unfortunately. If it was iTunes, then you'd be better off. I hate dissing winamp (its my mp3 player of choice), but it doesnt effectively output the Title/Artist/etc.. The only thing it puts out is whatever is in the taskbar as Title. Its kind of complicated. Itunes allows you to retrieve title/artist/etc. seperately using the DXPlayer function in DX. For things to be consistant, thats the best thing to use... Let me know if you need help learning about the 'whats playing' information... I've written some widgets that do that, but havent uploaded them.
Reply #3 Top
Yeah, I'd love help with the 'whats playing' aspect . So far I've been looking at antu^jamban's Silica Album Art widget , as it can get the file playing in winamp's name. I build my own player interface (to Winamp ), and am using the Silica Album Art widget for the cover, I just need to have the lyrics embedded in my desktop, and I'll be happy.

So yes, please! Throw widgets at me! Shower me with widgets!