Skip to main content
Topic: Winamp Status on Twatch (via Python) (Read 2720 times) previous topic - next topic

Winamp Status on Twatch (via Python)

Thread title is pretty self explanitory.
After not being able to find a virtual serial port to get LCD Smartie to work, I decided to have a go at writing my own code to do it.

The bulk of the program is the winamp IPC junk that I stole via google. (Link to original is in source).

It's pretty basic at the moment, but I thought people might like to see. I've got some speakers in my lounge room driven by my computer (long wires), this lets me know what's playing.

It shows artist on row 1, title on row 2, and a test string on row 3. Long stuff scrolls at a rate proportional to its length. The winamp code has hooks to add a play/pause indication, times, and a bunch more. It can also control winamp, but that's not really applicable to this application (unless there's a way to add buttons to the twatch, then it would be).


You'll proably need Python 2.6, and you will need pywin32. I'm running Python 2.6.4, pywin 214, and winamp 5.572.

{Attachment renamed to .txt for forum rules compliance, change it back to .py when you download}

TODOs:
make scrolling more robust
port to Python 3

Re: Winamp Status on Twatch (via Python)

Reply #1
Great job. Thanks! I'll add this to the SVN scripts folder, and post it up in a few day.
Got a question? Please ask in the forum for the fastest answers.

Re: Winamp Status on Twatch (via Python)

Reply #2
Couple of minor tweaks
- replaced a nasty magic number (20) with its constant (TWATCH_X)
- better scrolling timer method (I think. It's 2:30am, I haven't tested thoroughly)

I'll have a look at this whole SVN thing once I've had some sleep :)

Re: Winamp Status on Twatch (via Python)

Reply #3
Hi andrew - Is it possible to get a picture of your script in action? Thanks!
Got a question? Please ask in the forum for the fastest answers.