Jump to content

Winamp Automation Library


big_daddy
 Share

Recommended Posts

  • 3 months later...
  • 1 year later...

I want to write a song logger for Winamp. Basically, to have Winamp append to a log file every time Winamp starts playing a new track.

I've already seen the sample VBS code at the ActiveWinamp site that basically does this. And I understand how the AutoIt code here works.

Here's the thing: I want this to work even if I'm running multiple copies of Winamp. The way the approach here works, it attaches to one copy of Winamp. What happens if there are 5 copies running? Can one, or many, scripts be run, to react to the changed event across multiple Winamps? Or, is this a limitation of ActiveWinamp, and only one ActiveWinamp.Application object ever exists?

Any ideas?

Link to comment
Share on other sites

  • Moderators

I want to write a song logger for Winamp. Basically, to have Winamp append to a log file every time Winamp starts playing a new track.

I've already seen the sample VBS code at the ActiveWinamp site that basically does this. And I understand how the AutoIt code here works.

Here's the thing: I want this to work even if I'm running multiple copies of Winamp. The way the approach here works, it attaches to one copy of Winamp. What happens if there are 5 copies running? Can one, or many, scripts be run, to react to the changed event across multiple Winamps? Or, is this a limitation of ActiveWinamp, and only one ActiveWinamp.Application object ever exists?

Any ideas?

I do not have time to research it at this time, but if you do the footwork I'll answer any question I can. I'm guessing the approach IE.au3 and Word.au3 take to attach to existing documents would be a good starting point.
Link to comment
Share on other sites

I want to write a song logger for Winamp. Basically, to have Winamp append to a log file every time Winamp starts playing a new track.

I've already seen the sample VBS code at the ActiveWinamp site that basically does this. And I understand how the AutoIt code here works.

Here's the thing: I want this to work even if I'm running multiple copies of Winamp. The way the approach here works, it attaches to one copy of Winamp. What happens if there are 5 copies running? Can one, or many, scripts be run, to react to the changed event across multiple Winamps? Or, is this a limitation of ActiveWinamp, and only one ActiveWinamp.Application object ever exists?

Any ideas?

Why don't you just refer to the Media Library History? It tracks every file and play count. Settings can be found in Preferences > Media Library > History

Link to comment
Share on other sites

I'm guessing the approach IE.au3 and Word.au3 take to attach to existing documents would be a good starting point.

Thanks for the suggestion. That seems to work for attaching to various windows within a single application's MDI. But in the Winamp case, each Winamp process is separate, so the ObjGet call would just attach to one process.
Link to comment
Share on other sites

Why don't you just refer to the Media Library History? It tracks every file and play count. Settings can be found in Preferences > Media Library > History

Thanks for that idea. But, I'm looking to write my plays to a log file (or, in some other way, send info on each new track play outside of Winamp). This has to be used inside of Winamp. And the history file (recent.dat and recent.idx) is a proprietary format.

Is there a way to get this info via automation? Of course, I'm then back to the same problem: How can I attach to multiple processes which are all generating track change info?

Link to comment
Share on other sites

I want to write a song logger for Winamp. Basically, to have Winamp append to a log file every time Winamp starts playing a new track.

I've already seen the sample VBS code at the ActiveWinamp site that basically does this. And I understand how the AutoIt code here works.

Here's the thing: I want this to work even if I'm running multiple copies of Winamp. The way the approach here works, it attaches to one copy of Winamp. What happens if there are 5 copies running? Can one, or many, scripts be run, to react to the changed event across multiple Winamps? Or, is this a limitation of ActiveWinamp, and only one ActiveWinamp.Application object ever exists?

Never mind! I just did more ActiveWinamp RTFM (actually, I Used The Source), and realized that if you name a script startup_*.vbs, it'll automatically run it when Winamp launches. So, I tweaked the included logsong.vbs to not hold the log file open between writes, and I've got exactly what I want now!

Thanks everyone.

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...