View Full Version : Winamp Scripting
esulin
17th December 2006, 12:37
I just wanted to follow up on bwechner's posts...
I just started playing around with ActiveWinamp in C# the other day.
First off I played around with the code in Visual Studio 2003. I compiled and tested the sample c# program, and then wrote my own test program to familiarize myself with the code (i'm a relatively new programmer). In any case, in VS2003 everything worked perfectly and the events worked correctly.
I have since then installed Visual Studio 2005, and have convereted both the sample program and my program to the new format. It seems that both are now experiencing some form of problem when the events are fired by winamp. I have attempted to trace where the problem is and I got some very strange results (code being skipped). Although this could just be an error in my debugging efforts.
I will look into it further. But in the meantime I just wanted to point out that I seem to be having the same (or similar) problem bwechner's having.
UPDATE:
Well, what I noticed earlier seems to be true.
I am working with the sample code provided with the plugin in VS2005.
I placed breakpoints on the first three lines of OnTrackChange() (including the {).
When I changed track either through winamp or through the app the program would break at the {, but when I pressed continue, it did not move on to the "int pos = playlist.[...]" line but it seemed to exit the function and revert back to idle.
I ran the app and changed track several times, and on one of the tries, the code actually ran, and everything worked as it should. When I changed the track again, I faced the same problem as earlier.
I have noticed that if I wait a certain amount of time between skipping tracks that it's more likely that the code runs.
In any case, I'm not quite sure what the problem could be as I didn't even know that a function can just quit without some form of 'try' code or exit command, or without throwing a runtime error.
Let me know if there is any further info I can provide to help debugg this.
bwechner
17th December 2006, 21:27
esulin,
Thanks enormously for the experiments. I'm using Visual Studio 2005 Express and so it does look like we share a problem. Good efforts your side. I've lacked time with the Christmas and Birthday hooha surrounding these weeks for me and want to experiment some more too.
On the face of it, it seems that VS2005 introduced a new "feature" over VS2003 (given the sample code seems to work in VS2003 as expected). I wonder if shaneh is using VS2003 or VS2005 when he reports the demo code works?
The symptom's you're describing to challenge the imagination. No exception is thrown, nothing, just silent exit. I did try break points on the opening { as well and didn't catch any entry, but only tried a few times a week or two ago not exhaustively. It seems from what you've described to be timing related and quite possibly a threading issue with VS2005 and/or ActiveWinamp int he .NET 2 world?
Bizarre and a blocking issue alas. A real downer for now as I was very excited about ActiveWinamp!
shaneh
17th December 2006, 22:21
I'm pretty sure I was using VS2005, although the project distributed is for 2003 and I had converted it.
I wouldn't be surprised if breakpoints don't work very well. The event is synchronous, meaning it runs in a single thread and waits for your code to return before giving back control to the Winamp thread. You would want to ensure you do as little as possible in your event handler - perhaps just adding the event to a queue and handling it in another thread.
Instead of using a breakpoint you could try just outputting a debug statement or something just to see if the event is getting through. I will try re-write a small demo in VS2005 and see how it goes.
esulin
18th December 2006, 04:23
shaneh,
I actually tried that too... :)
I setup a list control and output two consecutive messages to the control in the first two lines of the function.
I found that when debugging it would break on the {, and then also break on the first line (messagebox listbox). The next continue would exit the function. During the times that the function exited, nothing was added to the control, even though according to the debugger it looked like the line should have been executed. During the instances that the code did work, both messageboxes calls correctly added to the listbox.
I also have VS2005 running on my laptop and am experiencing the same problem there.
The desktop is running Winamp v5.21, while the laptop is running v5.3.
I've downloaded the VS2005 SP1 last night and will give that a go on the off chance that the problem is due to some bug that has now been resolved. Will post progress.
Also, I tried running the code again today without any breakpoints, and regardless of what I tired it wouldn't execute the code. Although, when I put the break points back in, it managed to execute once.
I also executed the VS2003 project again just to double check that, and it worked perfectly.
UPDATE:
Also worth mentioning two more things.
First, I also noticed one additional thing, and I'm unsure whether it's related to the debugger, or to AW. Namely the first time that the OnTrackChange() is called VS freezes up for an amount of time that is always the same on each machine (i.e. 15 sec. on the laptop, 10 on the destop). This could be to do with the debugger processing something, or it could be waiting on a timeout or something like that from WA (the times might be different due to different playlist lengths).
Second, on my laptop the exact same code that is running on my desktop seems to return a blank value for playlist[i].Artist and playlist[i].Title, while the desktop coded runs fine.
shaneh
18th December 2006, 04:34
I think popping up a message box can be quite dangerous in an event handler when dealing with COM. I can't remember the exact details, something to do with it having its own modal message loop, and thus the COM messages are processed by the messagebox code. Something like that anyway.
You could try without the message box. I'll look into it further when I get a chance.
Also, you could try a simple VB script based event handler, as seen in the scripts examples.
esulin
18th December 2006, 04:43
Sorry about the confusion, I meant to say 'listbox', not 'messagebox' (will edit). The code is:
public void OnTrackChange()
{
lst_status.Items.Add("On Track Change Event Test 1");
lst_status.Items.Add("On Track Change Event Test 2");
int pos = playlist.Position;
ActiveWinamp.MediaItem mi = playlist[pos];
try
{ [and so on...]
The reason for two of them is because during debugging the app breaks on the first line and thus I wanted to have a second line of non-acitvewinamp related code to break on to see if the first gets executed.
esulin
18th December 2006, 06:41
Another update.
I've installed VS2005 SP1, but that hasn't fixed the problem. Although interestingly enough, the 10-15 second freeze I mention above now occurs every time the function is called.
Further more, I noticed some info the might be pertinent to the problem in the 'Locals' detais. When the debugger breaks on the { breakpoint the state of the 'winamp' object is as follows:
-winamp|{ActiveWinamp.ApplicationClass}|ActiveWinamp.Application {ActiveWinamp.ApplicationClass}
-[ActiveWinamp.ApplicationClass]|{ActiveWinamp.ApplicationClass}|ActiveWinamp.ApplicationClass
Hwnd|Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.|int
MediaLibrary|Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.|ActiveWinamp.MediaLibrary
Panning|Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.|int
Playlist|Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.|ActiveWinamp.Playlist
[and so on]
(columns are | delimited)
I assume this timeout is responsible for the problem. Any suggestions on what I can do to further trace the problem?
shaneh
18th December 2006, 12:49
I can't reproduce this with the demo, theres no noticable delays or missed events. Have you tried running the code outside of a debugger and without breakpoints etc? Just as a standalone exe?
Are you using the latest version of AW from the CVS? Perhaps you need to regenerate the interop code or something.
bwechner
19th December 2006, 23:35
Well, I've played around a bit and with VS2005 I can report:
The trackchange and volume change callbacks do not work at all in the demo or my code in debug mode.
They work find in a release build (standalone exe!)
So, I have no idea what's going on, but that's what I've found on my box.
Thanks for getting me that far, and I hope esulin's problem gets sorted too!
bwechner
19th December 2006, 23:39
Now that I have a small app working with track change events, I thought it nice if I could get a progress bar up as a song is playing in WinAmp.
The real hitch though is, that I can't find in ActiveWinAmp and property of a media item (or anything else, or a method) that would reveal how much of the song had played.
In short I can't work out what to set the progress bar to.
If I had that I could then update the bar every half second or so and get a nice progress bar during play on my app.
Any thoughts there? I haven't explored all the messages I could send to WinAmp yet (one of those may do the trick, but it would be nice if the COM object directly gave measure of this).
shaneh
20th December 2006, 00:06
Application.position will tell you the progress of the current track. Keep in mind that calculating lengths and position in a track etc is not too accurate in Winamp for some tracks. If you watch winamp, the length and position can jump around as the track is playing for some files. There is no real solution.
There is no event callback either, this would be too CPU intensive.
I suspect your debugging trouble is caused by your environment/debugger/code/breakpoints/interop code etc rather than ActiveWinamp itself if it works ok in a release build.
You could try deleting all your objects and interop dlls etc and re-generating them in a fresh build. But debugging COM events in .NET from a Win32 app not built for COM you can expect a few problems.
bwechner
20th December 2006, 00:23
Thanks. I thought Application.position was the position in the playlist of the track (first track is 1, second track is 2 etc.) and hadn't tried it yet. There you go, the hacker in my is getting tired, I should have just plugged it in and seen what value it has.
A callback isn't necessary really as any progress indicator, including the one WinAmp uses itself has to work discretely on some sort of timer cycle and I can just update every second, half second of quarter second or whatever I find yields a nice smooth indicator without too much update load.
I haven't the time to debug the debug issues ;-). It works in the release build and a build is produced in the blink of an eye (I'm just writing a very small app here) so I can proceed. Of course I'll never be able to debug my event code, but hey, I'll survive for now. I agree it's likely a VS2005 issue not an ActiveWinAmp issue though. And yes, given esulin's experience it seems it may be particular to my installation (esulin is getting some callbacks after all in debug mode if I read right and it seems you are too shaneh).
vect
8th January 2007, 03:51
Hi guys, I've written a new party shuffle script based off 'Party Shuffle 2.5' by osmosis and neFAST
I've always wanted a biased shuffle where lower rating tracks get less plays than the higher rating ones, and this is the main feature of this script. Also, it keeps a history of artists and songs played to avoid repeats for a while.
Since I'm pretty bad at explaining things, I'll just say to try it, mess around with it (there's a bunch of variables to change - eg. the bias doesn't have to be ratings based at all), do whatever with it. Don't think I'd be modifying the script much since it does everything I want, but tell me if I've done anything strange especially since I'm not a VB coder ;)
bwechner
8th January 2007, 09:53
I'm trying to get and set the rating of a media item. Yet this:
ActiveWinamp.Application WinAmp;
WinAmp.Playlist[WinAmp.Playlist.Position].Rating
always returns 0 even on rated songs I can see in WinAmp. Is that bug or am I misunderstanding something?
Curiously yours,
Bernd.
shaneh
8th January 2007, 11:01
Using:
msgbox (playlist(playlist.position).rating)
in vbs works ok for me. Theres a couple bugs with setting meta data, but retrieving the data should be ok.
bwechner
9th January 2007, 20:05
I'm using C# and alas all of Rating, Lastplay and Playcount return 0 (when they are not 0 in my media library), whereas Album, Artist, Filename, Length, Name, Position, Title, Track return the values I expect. Genre I don't use and haven't tried. That covers all the Media Item properties. Does that lend a clue? Or is the a next step in diagnosis? Perhaps an issue with my media library? Or my version of ActiveWinAmp (1.0 reported on options, but I think I have the latest sourceforge download and dll)..
shaneh
9th January 2007, 23:27
It shouldnt matter if you use C# or .vbs with regards to this problem..
Sounds like an issue with getting extended info/ml info. Do you have the media library set to load on startup? Does using ATFString("%rating%") return the correct value? Theres a 'refreshmeta' or some call which might help.
I intend to do a bit of work on AW soon to make it work with the new SDK etc which will involve re-writing much of the meta data fetching stuff anyway.
bwechner
10th January 2007, 00:36
Good on you Shane. I looked at the source on Sourceforge, but the learning curve for WinAmp plugins in C++ is too steep for me to tackle right now or I'd try myself.
I did try a refreshmetadata call before accessing it with no luck. I can try ATFString("%rating%") when I get home tonight (it says nothing to me now, I'll poke around, though actually may not find time till next week come to think of it as I'ma way for five days from tomorrow and have heaps to do tonight).
If you do further metadata work, a general call to access named ID3 tags would be great (as I'm keen to access the Year tag).
I'm also futzing about with system volume now and it's non trivial alas so I've shelved it. if ActiveWinAmp had broader volume control methods that would be a boon, but hey, it could outside of it's agenda. Let's say system volume is as important as WinAmps volume to me as an end user (as they work together). Alas it takes you into mixer space and individual channel volumes and a non-trivial system API (albeit not too complicated either).
shaneh
10th January 2007, 00:45
The year tag is already accessible, perhaps you aren't using the latest build from the CVS? (see the wiki, replace the dll in your plugins directory) Most/all ML fields are available as properties, or if not the ATFString() method can be used to get anything else. As I said, I plan on doing a bit more work on this to allow a generic 'getmeta' type call for stuff not covered.
AW does not read/write ID3 tags by design, its purely for Winamp manipulation. ie not every file winamp uses has id3 tags, so it goes against the general design.
bwechner
10th January 2007, 01:55
Ah, I thought I did get the latest DLL from CVS. But there's no ruling out human error and it's worth trying again. All at home and not chance to see it here (at work).
I agree wholly with the ID3 tag stance for the expressed reasons. I'm happy to access any of the metadata WinAmp supports in its ML. Interestingly though the ML has on Alt+3 and Ctrl+E metadata editing tools and the former is certainly format aware as it presents both ID3v1 and ID3v2 tags (annoyingly as I'd rather it just dealt with WinAmp metadata and a mapping between that and format specific tags were specific globally - which is how Mp3Tag, a wonderful freeware utility, works).
bwechner
12th January 2007, 09:06
Well I downloaded the latest copy of gen_activewa.dll from CVS. Like my old one it reports version 1.0.0.1 in the WIndows Properties dialog box but the file size is larger and I see that the Year property of media items IS implemented. So I did not have the latest version clearly.
However the following is sadly observed using Visual Studio C# Express. If I try to access the Year proprty it throws this exception:
"The procedure number is out of range. (Exception from HRESULT: 0x800706D1)"
which is documented as generic COM error with that HRESULT unknown.
It seems the following properties all throw exceptions in fact:
Year
Comment
Genre
WATitle
All with the same HRESULT.
the Rating property still always returns 0 for me, even when I demonstrably have a rating in the media library. The same is true of Playcount.
Oh well. Something is awry. I'm happy to contribute code if it helps. Visual Studio C# Express is a free download IDE and a dream to work with.
Cheers,
Bernd.
bwechner
12th January 2007, 09:12
Oh, by the way, this returns the year correctly:
MediaItem.ATFString("%year%")
Alas the rating is still zero when I try:
MediaItem.ATFString("%rating%")
but I have no reference for what legal ATF specifications are. Google's not helped me any on that front and the acronym means nothing to me.
shaneh
12th January 2007, 09:17
It sounds like you may need to regenerate youre interop code. When using C# to talk to a COM object, Visual studio generates some proxy code, you may need to regenerate this now you have the new .dll.
Ive done up a basic ATF reference here:
http://www.myplugins*******winamp-wiki/doku.php/advanced_title_formatting
bwechner
12th January 2007, 21:46
Originally posted by shaneh
regenerate youre interop code. When using C# to talk to a COM object, Visual studio generates some proxy code, you may need to regenerate this now you have the new .dll.
That begs the newbie question "how?" I can't find anything simple again on Google or MSDN. So I deleted the files named Interop.ActiveWinamp.dll and rebuilt with no change. I'll keep looking but have to run now.
bwechner
14th January 2007, 10:34
Another odd thing s since I installed the latest DLL. The Track property is not returning the track number any more, but some arbitrary number. Example: 1895036. The ATFString function returns the correct value for %track%, so I'm using that now. Indeed the ATFString function is a beauty and worth extending kudos for! Wonderful function.
Alas it won't return my ratings either. But hey, that's life for now. I need ultimately the ability to set the rating too, ideally. That's about the only metadata I want to be able to change form my app (for now).
shaneh
14th January 2007, 10:39
Yeah I think theres some bugs with meta data reading/writing. I think the newer versions of winamp aren't as tolerant with the buggy methods. I could spend time debugging and updating. But Id rather wait for the newer unicode variants of winamp to stabalise, and build for that instead.
bwechner
14th January 2007, 21:25
Sounds fair to me. WinAmp seems to update fairly frequently (I get the bothersome upgrade messages more often than I like ;-).
keepitcool4
24th January 2007, 14:48
is it possible to call jumptofile from within ActiveWinamp?
because I would like a "real" enqueue option, or has someone got a workaround?
because adding the song to the end of the list isn't such a pretty option ic with shuffle
besides that, AW is awesome :cool:
osmosis
30th January 2007, 21:26
slightly newer version benefiting from vect's Biased Shuffle (which i can't get to work). just adds tracking of manually added songs in the enqhistory, so as to avoid repeating those as well. seriously looking into bringing the bias/weight shuffling from either that or Anreal's SendTo or a variation thereupon, so hopefully i'll have that together in the near future.
15 track version on the wiki (http://www.myplugins*******activewinamp/doku.php/examples:root)
playlist_Party Shuffle (20).vbs
osmosis
31st January 2007, 18:38
fixed 20 track (forgot to change a couple instances of EnqHistory to SongHistory):
vect
31st January 2007, 23:35
Bugfix. Shouldn't crash with bad queries now. :)
osmosis
1st February 2007, 05:02
okay so it looks like i ballsed up. mine can't log the user addition of tracks because the playlist.item.DBindex value is different from that which is generated in the scripting dictionary for each track. any ideas on how to reconcile this?
haha got it. just had to stop using the Rand2 value and plug it back into the mlq query for the DBindex to use. Funny that they'd differ though.
osmosis
1st February 2007, 05:59
i'm liberal with numbers so here's 2.8 since i think i've fixed the Rand OOB error too by trying out Anreal's version of the code.
heygrady
26th February 2007, 01:30
I am working on a sidebar gadget for Windows Vista. I was able to get the ActiveWinamp plug-in installed. I was also able to successfully use it to get the current playing track.
What is not immediately obvious is how to use the event callback function. I am using Javascript (JScript).
Winamp = new ActiveXObject('ActiveWinamp.Application');
document.getElementById('message').innerText += Winamp.Playlist(Winamp.Playlist.Position).Artist;
Winamp.ChangedTrack = function ()
{
document.getElementById('message').innerText += 'ChangedTrack';
}
This will grab the current playing track but then it throws an error on the Winamp.ChangedTrack line.
What is the correct way to register a callback function on the ChangedTrack event using JavaScript?
Thanks
Jim_Nastiq
24th May 2007, 15:38
is there a way to use winamp scripting and change the audio output device for winamp?
ChaosBlade
26th May 2007, 12:58
I was using AW in a C# project to fetch some random metadata. I couldn't get stuff like BitRate and such to work (i used ATFString). I was using Winamp Lite though, Which lacks the ML. I'm not a WinAmp user mainly, so i'll have to ask - Is the ML required for that kind of info?
osmosis
27th August 2007, 19:23
Just dropping a note: Winamp 5.36 Beta AND Explorer crash in WinXP when attempting to use AW.
ktdt00
29th August 2007, 17:38
Hello,
This ActiveWinamp script will migrate ratings from Windows Media Player (WMP) to Winamp.
Note that it doesn't do true synchronization. It is one way from WMP to WA. It also ignores songs that are already rated in WA.
I wrote it to help migrate from using WMP as a player but I still prefer it for managing my library. I found a few other scripts that did ID3 tag migration but nothing that did WMP (I'm using WMA's).
I actually wrote it for MusikCube and then ported it because I'm still looking for the perfect player. Full featured but low footprint.
It did my 2500 song library in just under a minute.
It's public domain so enjoy.
KTDT00
gonemad
2nd September 2007, 02:03
Originally posted by ChaosBlade
I was using AW in a C# project to fetch some random metadata. I couldn't get stuff like BitRate and such to work (i used ATFString). I was using Winamp Lite though, Which lacks the ML. I'm not a WinAmp user mainly, so i'll have to ask - Is the ML required for that kind of info?
im pretty sure all the of the data is retrieved from the ML.. so yea i'd think it would be required
fooeynet
11th September 2007, 20:49
Originally posted by osmosis
i'm liberal with numbers so here's 2.8 since i think i've fixed the Rand OOB error too by trying out Anreal's version of the code.
Love the script, but made a change so it worked better for my library of music. I was unhappy with the songs that were being selected for the playlist, and after looking at the code I figured out the reason: the songs generated in the playlist are based on random selection of all the *artists* found in your media library, so if, like me, you have a lot of "compilation" albums (remixes, soundtracks, etc.) you could end up hearing cuts from the same compilation album relatively close to each other in the playlist.
So in this area of the code:
i = 1
For each track in mlq
' First entry without ":"
if Dict1(track.album)="" then
Dict1(track.album) = CStr(i)
else
Dict1(track.album) = Dict1(track.album) + ":" + CStr(i)
end if
i = i + 1
next
...I changed the track.artist references to track.album. This way my playlist is generated using songs appearing across random albums in my library, rather than artists. (Personally, I'd rather hear two songs from the same artist more frequently than two songs from the same album). It also more accurately reflects the music dispersion of my media library -- artists that I have more tracks for will appear more often in my playlist.
I suppose now that Winamp supports "albumartist" as of 5.34 (and supports using "artist" if "albumartist" isn't found) you could also use that, if your mp3s are tagged properly.
Hawkmoon77
26th September 2007, 17:57
Please help me out with this, I'm going nuts! The problem just doesn't make any sense to me.
I am using the active winamp plugin as part of a VB .NET project. I created an object pointer for the active winamp plugin:
Dim WithEvents Winamp As ActiveWinamp.Application
and then created a new instance of it in the form load procedure:
Winamp = New ActiveWinamp.Application
Then I added the event sub for the changed track event. This procedure triggers when winamp changes tracks, and successfully displays a messagebox:
Private Sub Winamp_ChangedTrack() Handles_ Winamp.ChangedTrack
Msgbox ("Track changed.")
End Sub
But this one does not work!
Private Sub Winamp_ChangedTrack() Handles_ Winamp.ChangedTrack
TextBox1.Text = "Track changed."
End Sub
I can't imagine what the problem is. With some experimenting, I noticed the following unusual occurrences within the changed track even procedure:
1. Cannot update any feild on the form
2. If I set timer.enabled = true, it never actually fires the tiemr event, however, if I later check the timer.enabled property, i find that it was actually set to True
3. Cannot perform a refresh of the form or any of its contents, the debugger just skips the command as I step through it.
4. I can add text to a listbox, but it never appears on the screen. I know its there because I can later query the listbox items, and find that the text was added. It was just never updated on the screen.
I have NEVER encountered something this odd. Can someone please point me in the right direction?
Thanks,
-Joe
Hawkmoon77
28th September 2007, 14:07
I decided not to use active winamp. I can't get past the bugs, and I need a bit more customization for cleaner code.
I decided to write a separate winamp class that I will ultimately compile into a dll for neat integration with my .net project.
I did not take this route in the first place because I needed winamp to throw some events to my App. I figured out a very reliable way to do that without involving plugins or subclassing. It's neat and works reliably.
I think, just to keep it simple, I will develop the project to be a full winamp control wrapper / event handler. Of course, by full, I mean, complete for the purpose of my application. I would be happy to add in the entire library of IPC messages, but I just don't know what all of them are!
Flo_La
21st October 2007, 20:14
Let me start by thanking Shane for this great plugin, 1000 times.
Recently I used it to write a script for "scrobbling" tracks to last.fm (http://last.fm) / audioscrobbler. It serves me as an alternate scrobbler to the official last.fm client and also submits my ipod shuffle tracks. So I think it is quite useful and I've been offering the script at the last.fm forums (http://www.last.fm/forum/21716/_/331919/_/4879055) for evaluation/testing.
Now down to the point: I read osmosis' post above and it seems like the most recent version of Winamp is not compatible with the ActiveWinamp plugin. (Well actually the other way round ;) )
Shane, do you plan on supporting and/or updating ActiveWinamp for Winamp 5.5?
It goes without saying that I would be extremely happy about that! :D
foxyshadis
22nd October 2007, 21:50
It works fine now. Whatever the issue was in 5.36, the winamp devs seem to have fixed it pretty quickly.
osmosis
22nd October 2007, 22:01
still doesn't work for me. and it's not in the dev's perogative to fix things to accomodate broken plugins as they change their API, it's the plugin dev's responsibility, since the winamp devs would only change things that could break plugins if they have to. It is, however, much easier to break ActiveWinamp due to the way it interacts with Winamp's COM interface, so I'm still waiting for a version updated to work with Winamp 5.5
foxyshadis
24th October 2007, 00:30
Then there's something else going on with your install, because I have no issues with it. You're sure it's not an interaction with another plugin, a scripthost installation problem, or some other system issue?
osmosis
24th October 2007, 01:12
what scripts have you tested it with?
foxyshadis
24th October 2007, 03:46
Not that many, and not terribly complex ones, but here's some of them. Which of yours cause a crash? Maybe I could reproduce the same here with a sample.
Also, *shock* over the forum sending out email notifications in a timely manner today.
osmosis
24th October 2007, 07:54
hmm. set playcount crashes my setup even.. that's troubling. I just use my party shuffle script and test out some variants/alternates that other people have made. Haven't encountered any problems until the 5.36 Beta and now 5.5 though.. I wonder how i can hunt down the problem.. perhaps AW got unloaded as system dll somehow.. i'll post back after i try a couple things.
Edit: Yup. Not sure how.. but somehow it got unloaded. Note to any others experiencing crashes in Winamp, Explorer etc, when trying to run any/everything at all in AW:
regsvr32 "c:\program files\winamp\plugins\gen_activewa.dll"
should fix things provided you know the script you're using to be properly written.
Flo_La
27th October 2007, 23:17
Thanks osmosis and foxyshadis for the testing.
I actually used AW with WA 5.5 myself now too. And my moderately big project works with it too. Great!
So AW is still alive.
Arqane
6th December 2007, 04:41
Hey all. I'm writing a program that will run through any audio player through scripting. For simple support though, I want commands that use a single line, for example:
'WinAmp.Play'
Fortunately, I need a small list, and most are taken care of already. From what I've seen...
These are already done:
Play, Pause, Stop, Restart, Next/Previous Song, Louder/Softer
These need to be done still:
Fast Forward/Rewind (as a state), Play(<Playlist String>), and Speed Up/Speed Down.
iTunes is actually a wee bit ahead with FF/Rewind and Play Playlist scripts taken care of. However, even though it will be tricky, WinAmp can probably finish the speed change first. The plugins are there, but those would have to be scriptable as well.
Any suggestions for making these functions?
Stupifier
7th December 2007, 20:59
Originally posted by osmosis
hmm. set playcount crashes my setup even.. that's troubling. I just use my party shuffle script and test out some variants/alternates that other people have made. Haven't encountered any problems until the 5.36 Beta and now 5.5 though.. I wonder how i can hunt down the problem.. perhaps AW got unloaded as system dll somehow.. i'll post back after i try a couple things.
Edit: Yup. Not sure how.. but somehow it got unloaded. Note to any others experiencing crashes in Winamp, Explorer etc, when trying to run any/everything at all in AW:
regsvr32 "c:\program files\winamp\plugins\gen_activewa.dll"
should fix things provided you know the script you're using to be properly written.
So, I just ran that command in the command window....it said it succeeded. I open winamp, and try to run the "x rating times" script and it doesn't work. After closing Winamp, I also get a "Dees Not Respond" error as well.
osmosis
7th December 2007, 22:35
try just plain reinstalling ActiveWinamp, my regsrv thing is only if running any script crashes Winamp (meaning somehow the dll got unregistered - although it should work in lieu of a fresh install, i don't want to guarantee it). Also, it is possible that certain peices/functions of ActiveWinamp are becoming incompatible with the API changes in newer versions that are coming out, but that would be something for shane to look into and i can't help you there.
osmosis
20th December 2007, 22:30
anyone else experiencing scripts not showing up in the Scripts submenu as of 5.51?
seym
22nd December 2007, 12:44
hey! first of all: great plugin. i love it!
but... why does the ChangedTrack event trigger twice sometimes? and is there an event which triggers at the end of a track, before changing to the next?
osmosis
27th December 2007, 04:36
have i mentioned that scripts run normally but don't show up in the Scripts or Send To menus in 5.51?
GTFI
18th January 2008, 12:31
Originally posted by osmosis
anyone else experiencing scripts not showing up in the Scripts submenu as of 5.51?
Originally posted by osmosis
have i mentioned that scripts run normally but don't show up in the Scripts or Send To menus in 5.51?
Same thing here... (@5.52)
Anyone help? I would like to run mp3tag.
Flo_La
18th January 2008, 20:26
Are you guys talking about ActiveWinamp with Winamp 5.5X under Windows XP or Vista?
I am using it under XP and the scripts show up in the playlist scripts right click menu as well as in the send to menu.
Btw, does anyone know what the current status is in terms of AW under Vista?
What I have gathered so far is that it should "only" need a new installer that registers the dll properly. Is that right?
I'd appreciate any news about further development/bug fixing of AW. (Was trying to post on the sourcefourge site, but it's very silent there.)
osmosis
18th January 2008, 20:45
Yes, I am on XP SP2, nothing shows up.
GTFI
19th January 2008, 04:05
The installer does this whit the dll:
regsvr32.exe /s "C:\Program Files\Winamp\Plugins\gen_activewa.dll"
The /s halts the installation, but if you kill the regsvt32.exe during installation and after that you register manyally the dll
(Start -> Run ->
regsvr32.exe "C:\Program Files\Winamp\Plugins\gen_activewa.dll")
But the result is same, scripts popup-menu is missing.
Using Vista32bit...
osmosis
19th January 2008, 04:39
@GTFI: That must be because it's trying to install it silently (/s) and the installer doesn't have the system rights to do so on Vista.
@Flo_La: Are you using 5.52? What plugins do you have installed? (both of the default included and 3rd party)
Flo_La
19th January 2008, 11:09
I was using 5.51, upgraded to 5.52 today and AW still works, shows all the scripts.
My installed plugins:
standard ones:
gen_ff.dll (NS modern skin support)
gen_hotkeys.dll
gen_jumpex.dll (jump to file extra)
gen_ml.dll (media library)
ml_pmp.dll (portable media player support)
ml_autotag.dll
ml_plg.dll (playlist generator)
ml_rg.dll (replay gain)
ml_transcode.dll
pmp_usb.dll
and other standard plugins that i doubt could possibly interfere:
dash, nowplaying, local, orb, playlists, online, wire, disc, bookmarks, history. (it's always ml_*.dll)
non-standard/third party plugins:
gen_activewa.dll (of course)
gen_sleep_timer.dll (SleepTimer 0.1)
gen_sripper.dll
ml_ipod.dll (the third party one)
osmosis, is there anything in your plugins list that might interfere with AW?
osmosis
19th January 2008, 17:07
Yah, that's what i'm thinking. I'm disabling them and reenabling them one-by-one. I'll report back if it starts to work.
disabling all but what you had listed didn't do anything.. but i do know that AW ties into gen_hotkeys.dll and i don't usually install that since i don't use them.. i'll see if reinstalling with hotkeys makes it work.
edit: that didn't work either. i'm stumped as to why it works on yours but not on mine or GTFI's
Flo_La
20th January 2008, 20:52
@GTFI: So you are saying that registering the dll manually after the installer hangs is a viable workaround? That would be OK I suppose. Can anyone else confirm that? I don't have any computer with Vista to try it myself.
@osmosis: Sorry,I really don't know either. I guess you could try the famous "fresh install".
The only other thing that comes to my mind is that I deleted most of the scripts that come with AW from the scripts folder and I only have my own ones in there, they are only like 4 or 5. I don't think that should make any difference, just wanted to mention it.
osmosis
20th January 2008, 22:26
Yeah I did the same with the default scripts, and this IS a fresh install that I did as of 5.51 .. so maybe it's something that changed since I did a fresh install. I guess i'll try "fresh installing" AW again, even though if you register the .dll yourself it shouldn't make a difference.
EDIT: Didn't work.. BUT I know why! For some reason (probably Vista compatibility) starting with 5.5x my Winamp settings started being stored in %AppData%, AND apparantly when Winamp is set up for multi-user, AW doesn't bother looking in the main Plugins dir for its scripts, it looks under %AppData% as well, SO if you move the Scripts folder from "Program Files\Winamp\Plugins\Scripts" to "%UserProfile%\Application Data\Winamp\Plugins\Scripts" everything works again.
OR your other option (if you want to keep Winamp self-contained) is to move the entire %AppData%\Winamp dir to Program Files and change "inidir=" in Winamp\paths.ini to
"C:\Program Files\Winamp" (minus "s) or whatever.
So there you go, mystery solved.
EDIT2: I don't really recommend the last option though, I tried it and it appears Winamp just doesn't like it, and starts up a bit slower because of it.
GTFI
21st January 2008, 03:27
...
Didn't work.. BUT I know why! For some reason (probably Vista compatibility) starting with 5.5x my Winamp settings started being stored in %AppData%, AND apparantly when Winamp is set up for multi-user, AW doesn't bother looking in the main Plugins dir for its scripts, it looks under %AppData% as well, SO if you move the Scripts folder from "Program Files\Winamp\Plugins\Scripts" to "%UserProfile%\Application Data\Winamp\Plugins\Scripts" everything works again.
So there you go, mystery solved.
...
Thanks! So easy solution. All time I was thinkin that the plugin doesnt see the scripts folder, cause the scripts worked when running them manually... I wasn't aware of AppData winamp folder.
Thank you very much :)
lual
5th February 2008, 21:02
hi, i've updated winamp from v5.33 to v5.52 (WinXP).
now i have the same troubles like bwechner.
playlist(1).rating
and also
playlist(1).ATFString("%rating%")
returns always 0
before the update both of them worked.
is a solution for this issue out there?
regards lual
osmosis
6th February 2008, 01:55
shane hasn't gotten around to building the newer version of AW off of the unicode winamp sdk yet, so no, as far as i can tell, you're stuck for now. note what he said to bwechner and that it was over a year ago.
Aiikon
8th February 2008, 21:18
I've been working on a tool to help me manage/play my music using vb.net and I'm having an issue that I can't find a workaround for. I do all my work from an access database through adodb and I'm trying to get a way for winamp and my program to communicate what song is playing or needs to be played.
My problem is that a good portion of my library has unicode-only characters in their filenames and tags, which breaks ActiveWinamp. For some reason I thought I would be able have winamp play a song from its DbIndex, and I wrote a script that gathers those for me and associates them with my internal song IDs, which I happen to keep in the URL field of the files as well. Unfortunatly I wasn't able to find the function that I thought I saw that could return a MediaItem from a DbIndex, and on top of that ActiveWinamp returns -1 for the DbIndex of all files with unicode names, which didn't make sense if it was getting them directly from winamp.
I don't actually need unicode support, but ActiveWinamp should ignore unicode fields in MediaItems instead of breaking the MediaItem. From what I can think up so far, I either need:
ActiveWinamp to be able to load a MediaItem from a DbIndex, or ActiveWinamp to be able to get the URL field of a MediaItem and be able to search for a MediaItem based on the URL field.
Any suggestions for how to accomplish this?
Aiikon
8th February 2008, 21:26
Okay, addendum, I got winamp to play a media item from a DbIndex, I had earlier assumed that MediaLibrary.Item() was not the DbIndex but a .net collection (coming from a COM plugin, yeah I know). So now I just need to find a way to lift the DbIndex off MediaItems taken from the playlist that have unicode characters in their names, or get the URL field from a MediaItem, which would be nicer.
Aiikon
8th February 2008, 21:56
Okay, another note. I was able to lift the DbIndex from the majority of 5000 songs without trouble. Accessing MediaLibary.Item(DbIndex) returned a bad MediaItem for all of my unicode files, however accessing MediaLibrary(DbIndex) returned working MediaItems for all but 69 files. As far as I can tell, it hates a sort of bolded ~ symbol that a few albums use and perhaps a few others. I'll also add that my G15 doesn't know what to do with that symbol either.
Symbol, on the off chance that it actually shows up properly here: 〜
osmosis
23rd February 2008, 23:41
vect's Biased Party Shuffle has been posted to the wiki and rebranded as Winamp Party Shuffle 3.0 citing it's superior speed, good implementation of ratings bias, as well as its ease of, and full configurability.
So without further ado, here's the new Winamp Party Shuffle 3.0:
Biased Party Shuffle on the ActiveWinamp Wiki (http://www.myplugins*******activewinamp/doku.php/examples:playlist:biased_party_shuffle)
This defaults to a 20 track total.
If you liked the way the previous versions of Winamp Party Shuffle had a 15 track version and a 20 track version, simply copy the script in the same directory, rename it accordingly, and edit the CONFIG section of the script to have a lower "forecast" value (eg. 14 to 9 for a "15 track" version).
Enjoy!
heinz57g
5th March 2008, 21:30
WOW, when everything is well, i dont come here often, and
when i do, this single post has grown into 15 pages - i just
hope the ones 'handling' and overseeing things here dont get
tired of it.
scripts (shanes great ActiveWA): they worked fine till my last
WA update a few weeks ago (was it to 5.5?), but since a few
days i am getting a total breakdown whenever i for example try
to sort by track number (... serious fault, immdt close down ...).
am i the only one?
greetings - heinz -
osmosis
8th March 2008, 18:02
there was a small logic error i introduced to Party Shuffle 3.0 that stopped the weight bias from functioning. it's fixed now on the wiki. same version number.
@heinz sorry i only use AW for the party shuffle and that appears to be working properly (now hah).
heinz57g
10th March 2008, 20:11
the more scripts i try, the more i find that are shutting WA down,
completely - with a nice error code pointing right to AW.
shane, where are you? we need you.
greetings - heinz -
vect
26th April 2008, 14:10
I updated my biased party shuffle script quite some time ago, and have only just bothered to post the damn thing.
The whole way it does the 'bias' has been reworked.
There is only one query now, a bias value, and a rating function (at bottom of script). I think there's enough documentation in the script to work it out.
This system allows infinite levels of bias (provided you code them). There's an example in the script of using a track's 'year' attribute in combination with its rating to influence its chance of being enqueued.
Should also have a faster start-up time.
ps. didn't release this earlier because I thought it would be too complex, but I still think this is much more elegant than what I had before, and there still seems to be some interest in a party shuffle (hey I still use it :-)
pps. I had that same problem with the scripts not showing up! grateful for the workaround.
so take a look, play around, use it, rebrand it, whatever, enjoy :-)
artattack
28th April 2008, 19:21
Hi.
Just registered to say thanks, great script, I have been using for a few weeks now.
Arthur.
osmosis
13th May 2008, 22:41
@vect: Wow! Really really nice work. The part where it catches if the ML has updated since the script started is really clever. Thanks for all the work that must've gone into the script as a whole. Myself and surely many other people who've been wanting proper Party Shuffle functionality in Winamp (or a reasonable facsimile) are indebted to you.
I made some very minor modifications today and posted it to the wiki as
Winamp Party Shuffle 3.2: Biased Party Shuffle on the ActiveWinamp Wiki (http://www.myplugins*******activewinamp/doku.php/examples:playlist:biased_party_shuffle)
dzaharia
14th June 2008, 04:48
Great plugin, it's been great so far. The only problem is that i am having trouble finding some sort of index of messages and their significance. More specifically, i am looking for a message which toggles the playlist/ media library. Also, what do the three parameters of the message mean? Is there documentation which outlines this information other than the gen_activewa.chm?
Mitch72
16th June 2008, 13:56
With the biased party shuffle, is there any way to use only a certain playlist instead of the whole media library? Or perhaps by genre, or something contained in the comment field? Just curious, I don't really know anything about scripting myself, just wondered if it would be possible. Great script though, easy to configure, works well, etc.
EDIT: k, just kinda answered my own question here... changing mainquery = "type = 0" to mainquery = "comment HAS *keyword*" will exclude everything without that comment, correct? (Seems to work for me, but if someone could confirm this, that'd be great). I'd assume this works with other fields to, i.e. genre/artist/etc? Sorry if I'm being a noob about this :igor:... might be an idea to throw in some examples for parts of config section
osmosis
16th June 2008, 14:23
yup that's correct. you can do genre or whatever you like there.. even restrict by path. it's all winamp's db query language. some good examples/explanations are already present in winamp itself; go to the media library and open a new smart view or edit an existing one. click Advanced mode. Voila! All you ever wanted to know about querying the media library! hope this helps.
Mitch72
17th June 2008, 04:07
Yep, that's what I did (checking in smartview)! Lol cheers for the help, great script.
ZoScr
30th June 2008, 05:57
I'd like to script Winamp so that it writes current song playing info to a log file every time the track is changed. I read the sample VBS code that does just that.
Here's the thing: I want to do it across multiple copies of Winamp, and I'd like it to happen automatically.
I.e. If I launch a copy of Winamp, I'd like it to log to a file every time the track is changed. If I launch a second copy of Winamp, I'd also like that copy to log track changes.
Can this be done using ActiveWinamp?
Thanks!
osmosis
30th June 2008, 16:36
yes, if the script writes one line to a specific file every time the track changes, having the same script open in multiple instances of winamp should continue to log between the 2 of them, chronologically, every time a track changes. if you wanted to signify which winamp it was coming from you would have to have two copies of the script, one loaded in each instance of winamp, each appending something to signify (ie. win1 and the other win2) to the front of each log line.
ZoScr
30th June 2008, 18:01
Thanks for the reply.
But, let's say I want this to happen for every instance of Winamp I launch. And I may launch Winamp via launching an associated file (i.e. an MP3). What scheme could I pursue that would ensure that this new instance of Winamp has the script running that is logging to a file?
Meanwhile, I have found a plugin ("Now Playing") which pretty nearly solves my problem, as it runs for every copy of Winamp, and generates info on track change. Unfortunately, it has limitations that made it useless to me (it causes Winamp to lose focus for a few seconds while it's generating its log info, and it doesn't adequately log when you go from stopped to playing on a particular track). Hence, I'm still interested in something more generic, that I could tailor to my needs.
Thanks again!
osmosis
30th June 2008, 18:12
make the script a startup script and it'll always launch with winamp. it's bad practice to have something launch open-ended (ie. run but never stop), but that would be your best approach.
ZoScr
1st July 2008, 21:17
Originally posted by osmosis
make the script a startup script and it'll always launch with winamp. it's bad practice to have something launch open-ended (ie. run but never stop), but that would be your best approach.
Thanks! Although I didn't know what you were referring to by startup script, then I Used The Source (and then also found the documentation) and realized I could name the script startup_xxx.vbs and it'd run on startup.
I noticed the early doc mentions naming a script changetrack_xxx.vbs and having that run every time a change happens. I didn't find reference to this in the source. Was that eliminated?
Anyway, I tweaked the included logsong.vbs so it doesn't hold the logfile open between tracks, and now I've got my multiple Winamps all logging to a single file.
Of course, what I REALLY want is to perform an arbitrary action (launch an app, or send an HTTP POST, etc.) on track change...but now I know that all I have to do is figure out how to do this in VBScript, and I'm set. Of course, a little pointer for a VBS noob wouldn't go to waste.
Thanks! :up:
osmosis
2nd July 2008, 18:18
i don't think changetrack_xxx.vbs is a method that works any more, if ever. the audioscrobbler, etc., scripts that are posted in the examples should help you with the http post stuff. glad to help.
ZoScr
2nd July 2008, 18:32
Great, thanks! :)
mrtech
7th August 2008, 16:16
I have a c++ component that does raw_Insert's into the media library via this component, is there a msg or method to refresh the library listing after such an insert? I have everything else working, but requires a manual refresh to see newly added tracks, thanks.
osmosis
7th August 2008, 16:24
i think it would have to be something to do with Hwnd, but other than knowing that, it's beyond my expertise.
AndreaP
30th August 2008, 21:46
Hi everybody.
I'm desperately looking for a way to automate my web radio..
I didn't find any scheduling program or any other plugin right for the purpouse.
I try to explain (sorry for my weak english..): I have a number of folders (or playlists too), "songs" "jingles" "talks"... And I simply want to assign to Winamp a rule to pick and play a file from folder (or playlist) "jingles" every three songs, and another file from "talks" every two songs, and so on.
I did not find any (free) software or plugin good for this.
Finally I found Activewinamp.
Maybe with this plugin it is possible, but.. I don't know anything about scripting..
And so: does anyone know if there is some script good for me?
Or... Maybe someone wants to try and create it?
Thank you,
bye
A
AndreaP
3rd September 2008, 07:04
...Is this thread dead?
AndreaP
DrO
4th September 2008, 11:56
people will generally reply a) when they can and b) if they can and can offer valid information. typically no reply means no one can help or have not seen it and been able to reply. you'll have to have (quite) a bit of patience around here for info/replies.
-daz
AndreaP
4th September 2008, 13:33
No problem DrO.
I'll wait.
Hopeful.
A
Mitch72
27th September 2008, 08:27
Just a random (probably kinda noob-ish) question here- to anyone that's familiar with the autohotkey, is it possible to use it to call up a playlist script?
For example, I have a script that opens up firefox and searches for the lyrics of the current track. I know how to use winamp to create a global shortcut for this, but I'd prefer to use autohotkey.
After a bit of looking around, I'm thinking that I'd be using postmessage/sendmessage (see this thread (http://www.autohotkey.com/forum/topic126.html) on the autohotkey forums).
As the thread suggests, I've used winspector to get the control ID, but I'm having trouble getting this to work in the autohotkey script.
Winspector returned a control ID of 61692. I'm assuming that I should be using 0x111 since its a WM_COMMAND message, so I'm thinking it would be a command like this
^+g::PostMessage, 0x111,61692,,,ahk_class Winamp PE
Which isn't working :(
I'm guessing, unless I have the syntax wrong, that the ahk_class is wrong, or I shouldn't be using that at all.
I'm sorry if this is the wrong place to ask, but any suggestions would be appreciated.
osmosis
27th September 2008, 14:05
not sure if i'm following you correctly, but winamp has its own global hotkey plugin and with activewinamp installed you should be able to set up any script with a hotkey.. might be easier if everything you're doing is confined to winamp already.
Mitch72
28th September 2008, 05:44
Yeah I know, that's what i've been doing. I'd just prefer to use autohotkey- specifically becuase I want to use more than one hotkey (i.e. Ctrl+Shift+W+L, with the two letters). Winamp won't let me do this, and I'd prefer to have 'em all in the same place. I know I'm overcomplicating things here, just something I was thinking about. Thanks for the suggestion though :D .
osmosis
25th January 2009, 19:58
Okay so with the advent of Winamp 5.55 there are some changes to the Media Library which affect Party Shuffle by making it hit the Safety limit (which prevents infinite loops) all the time, triggering a debug message. It also causes the script to disregard rate weighting code and simply pull tracks out of the ML at random. I'm not sure if there's anything that can be changed in the script to accomodate the changes, it might be that ActiveWinamp (sorely) needs an update. However as a temporary "fix" you can force Party Shuffle to work by making sure your Safety limit is a low number (100 or less to force it out of the loop faster) and changing showWarnings to false in the settings. No way to make the rating code work though, sorry folks. :hang:
DrO
25th January 2009, 20:57
erm, no idea what this 'safety limit' thingy is, but there shouldn't have been any changes made that would affect the loading of things compared to the previous 5.54x client.
if there is something then would need some more details about the issue if a regression/new bug has definitely appeared.
-daz
osmosis
25th January 2009, 21:02
The safety limit is part of the script in question (http://www.myplugins*******activewinamp/doku.php/examples:playlist:biased_party_shuffle) (just a counter inside the track choosing loop) and somehow the track choosing part of the script doesn't work with 5.55. The fact that it's hitting the limit means that none of the tracks it comes across are meeting its criteria to be added to the playlist which most likely means that it's a problem with the way ActiveWinamp grabs the ratings from the ML (ie. it can't). That's just a wild guess though, I haven't looked into it yet.
DrO
25th January 2009, 21:08
k, if you can look into it a bit more and reply back then that'd be appreciated since i'm not sure at the moment what might have caused a change but knowing what is broken on the script side may help to track things back through.
-daz
osmosis
28th January 2009, 20:06
Well I haven't had time to get into mucking around with the scripts yet but I get a nasty error every time I close Winamp. It started with 5.55 beta 1 and still happens with beta 2 and only occurs when gen_activewa.dll is in place. Winamp settings still save on close as per usual, just the error every time. Perhaps related?
Error as follows, always the same:
http://stashbox.org/378856/ohyes.jpg
vect
31st January 2009, 23:36
Just tried 5.55 Build 2353 with my shuffle script.
All the tracks return the same DbIndex(http://www.myplugins*******activewinamp/doku.php/activewinamp:docs#media_item_properties) of 0 - the script uses this to identify the track so it goes "hey I've played that track before" when it hasn't.
A temporary but not ideal fix would be to disable the track-repeatition checking by removing "and (not arraycontains(songHistory, tracks(randsong).DBindex))". :igor:
DrO
2nd February 2009, 12:27
i'm going to try and see if i can track down the issue (on the winamp side) over the next few days and i'm hoping vect's info gives me a bit more to work against.
as for the crash on close, i'm not 100% on what would/could cause that as i'm not aware of any on-exit changes other than the removing of the need of plugins on 5.5x+ to not have to unsubclass since they're kept loaded after the main winamp window is destroyed.
also whilst i remember, what version of the plugin are you using? just to make sure i test against the correct one (i remember the source was made available but from a quick look in cvs, i'm not 100% sure if what is there is the same as what was provided as the last compiled version of the plugin).
-daz
osmosis
2nd February 2009, 16:06
I'm using the latest CVS version (http://activewinamp.cvs.sourceforge.net/*checkout*/activewinamp/activewinamp/Release/gen_activewa.dll). Thanks for all the effort Daz. :)
osmosis
5th February 2009, 05:56
Here's a proper crasher report from my end. Thanks again Daz.
DrO
5th February 2009, 12:55
i've done some brief testing and it's not been crashing for me on close though i can repro the limiter issue (so that's something). i did get a crash when trying to run a script without the plugin having been registered first so need to track that down as well.
one thing that concerns me is the version i've built is a lot smaller than the one i took from cvs (when built against the cvs code) but the few scripts i tried seem to working ok so i dunno what that is all about, heh.
i'll pm you a test build to try out shortly (~ a day or so) so we can start testing things out a bit more once i've had a proper look at things (especially the close handling)
-daz
osmosis
12th February 2009, 18:37
Hmm.. weird that the crash on close doesn't occur for you with the CVS dll. I look forward to trying your test build. :)
schulze
27th February 2009, 15:43
hi there!
just wanted to let you know that i get the same error like osmosis (only difference is the offset: mine is 0x01315255 and yes, i registered the dll after updating to 5.55).
I'm using the "latest" cvs version and a quite stripped down winamp (classic skin, no enconding/video stuff, everything removed that's not necessary for me).
only non-official plugins are: in_mpc.dll and gen_classicart.dll (beside activewinamp of course :P)
if i move these out of the plugin-folder, the error still exists but offset changes to 0x012b5255
maybe this helps to fix the problem.
anyway...5.55 is great! best thing is the new playcount-stuff!
Originally posted by osmosis
Well I haven't had time to get into mucking around with the scripts yet but I get a nasty error every time I close Winamp. It started with 5.55 beta 1 and still happens with beta 2 and only occurs when gen_activewa.dll is in place. Winamp settings still save on close as per usual, just the error every time. Perhaps related?
Error as follows, always the same:
[Image] (http://stashbox.org/378856/ohyes.jpg)
Flo_La
5th March 2009, 15:50
DrO, osmosis, any news from your testing?
I have a question about your build from the cvs: Do you use the new (5.32) version of the plugin development kit or the older one? I am not sure, maybe building with the new kit requires substantial changes in the source. I would like to know if there is any chance that someone here will maintain - and I really only mean "maintain" - the ActiveWinamp plugin. As far as I have read, it should be possible for ActiveWinamp to also support files and media items with unicode characters, if it were possible to build the plugin with the new development kit. Is that information right anyways?
I just think that AW is such a great plugin and it would be incredibly sad if it died. So if someone could maintain the package, it would be beneficial for many people using the plugin. At this point I should probably also mention that I have been developing a client for last.fm that is based on AW (available at http://awaas.sourceforge.com ). Currently there are more than 30 downloads per day and in some parts of the program I am limited by 2-3 bugs in ActiveWinamp. Naturally, I'd be more than willing to help fix these! Unfortunately my experience with building Winamp plugins is practically nonexistent. However, if someone could take over the building and maintenance of the project, together we could probably fix lots of stuff and ensure that AW will stay "operational".
Let's hope we can revive ActiveWinamp! (and of course fix the issues with 5.55 betas along the way)
Florian
osmosis
6th March 2009, 16:10
Great to see more people interested in this plugin's continued development/maintenance. Here's the latest:Originally posted by DrO
the code for it is stuck on my dev machine that i've got to re-build still so will send you something when that's back up (have to get it rebuilt sooner as it's hindering me in a few areas now though the coding break has been nice, heh)
-daz
StevenE
13th March 2009, 00:42
I tried hunting everywhere but seem to be missing basic documentation for the active Winamp plugin.
My goal is to control 2 instances of Winamp through vbscript.
Can someone point me to a sample script or documention for basic controls like play,stop,pause,next,previous maybe even remove a song from the playlist for the plugin using vbscript ?
Unless I am barking up the wrong tree.
Thanks
StevenE
DrO
24th March 2009, 21:20
Originally posted by Flo_La
any news from your testing?have finally gotten the time to look into things and alas i'm not too sure what can be done since the party script was making a lot of use of .DBindex but going on the code i've in front off me the accessing of the extended info item 'DBIDX' (which DBindex gets) was dropped - i think it was done in some of the database improvements made for 5.55 but i can't verify that is the exact reason at the moment. that's the only thing i can find that would correspond with the 'fail' happening between the 5.55x and previous installs.
so somehow, someone is going to need to adjust the script to not require the use of .DBindex or i'll try and see if i can replicate what was being done (but i first need to make sure the files that will allow that are public/can be made available if not already).
as a work around i found changing and (not arraycontains(songHistory, tracks(randsong).DBindex)) and keep)_ to and keep)_ at least seems to keep things functioning ok though obviously that's not an ideal situation if you're trying to prevent recent playback of an already played track.
-daz
mrtech
22nd April 2009, 18:18
Any progress on the closer crasher?
DrO
23rd April 2009, 06:55
nope as i've never been able to produce a crash on close with either the temp build i did or with any off the official builds.
-daz
mrtech
23rd April 2009, 14:01
Any chance you can share you build, would love to test it thanks.
MarquisEXB
29th May 2009, 15:14
Originally posted by Mitch72
Yeah I know, that's what i've been doing. I'd just prefer to use autohotkey- specifically becuase I want to use more than one hotkey (i.e. Ctrl+Shift+W+L, with the two letters). Winamp won't let me do this, and I'd prefer to have 'em all in the same place. I know I'm overcomplicating things here, just something I was thinking about. Thanks for the suggestion though :D .
I'd be interested in this as well. It'd be nice to be able to call these scripts from outside of Winamp. Right now I have half of my scripts in Winamp Hotkeys and the other half in AHK.
If anyone figures out how to do this...
MarquisEXB
29th May 2009, 15:19
Does anyone know how to use RunScript? It seems to work if I use the full path to the file "C:\Documents and Settings\X\Application Data\Winamp\Plugins\Scripts\playlist_z_Ratings_0_to_2.vbs", but if I just use the filename "playlist_z_Ratings_0_to_2.vbs" it doesn't.
Also anyone know how to use any of these in a AW script?
ScriptName = Wscript.ScriptFullName
ScriptPath = WScript.Path
Works fine in regular vbs, but not in ActiveWinamp.
bwechner
24th August 2009, 13:07
I use ActiveWinamp successfully to edit the tags on a track, like title, album, artist etc. The changes however appear only to e made to the winamp database not written to the MP3 file itself.
In Winamp when I edit tags (press CTRL+E with a track selected in the media library) there is a checkbox labelled "Update file tag(s) if supported". This is perennially checked on my winamp. It remembers it and I like it checked. I want my file metadata kept up to date.
Is there a way with Active Winamp to cause the same effect, for the tags to be written to file, not just the media library?
osmosis
10th December 2009, 05:45
very very busted in Windows 7. :hang: :(
smk-ka
12th January 2010, 13:37
I've disassembled the code and tracked the crash on close issue down to a missing CoInitialize() call in the CScriptManager destructor (CoCreateInstance() returned a - surprisingly - helpful error code). Recompiled with the attached patch applied and everything seems to work again. :)
-Stefan
smk-ka
12th January 2010, 13:42
The recompiled plugin.
-Stefan
osmosis
12th January 2010, 15:36
Thanks for the hard work smk-ka! What OS are you running? The DLL is still unregisterable in Windows 7. :( Any way you know to fix that?
smk-ka
12th January 2010, 16:34
Sorry, I should have clearly stated which issue has been fixed: it's the crash on closing bug. ;) I'm running XP. What do you exactly mean with "unregisterable"?
osmosis
12th January 2010, 18:25
gen_activewa.dll needs to be registered with Windows via the regsrv32 command in order to run. Windows 7 doesn't appear to allow this to happen.
smk-ka
12th January 2010, 19:28
Did you try to elevate to Administrator privileges, as this page (http://social.msdn.microsoft.com/Forums/en-US/visualfoxprogeneral/thread/5c532241-629f-4f00-b6e0-8e5bc89b82cb) suggests? Otherwise the registry settings seem not to persist.
osmosis
14th January 2010, 20:38
Aha! Stupid of me to not think of it! Brilliant. You've done an amazing thing shaking some of the dust off of this plugin. So many thanks for that! :D
I'm also happy to report Winamp Party Shuffle now works again using vect's tweak (http://forums.winamp.com/showthread.php?postid=2481633#post2481633) (with the exception of song history due to DBIndex still being broken as mentioned by DrO here (http://forums.winamp.com/showthread.php?postid=2500423#post2500423))
DrO: Is there any unique way to identify a song from the ML now (since that's what DBIndex was really) or have you looked into making DBIndex available again somehow like you mentioned?
fixin
24th January 2010, 16:41
so, i din't find answer, topic is very long - is the scripting works in Winamp, and what it can do. Does it can work with medialybrary?
osmosis
24th January 2010, 16:54
Scripting works. It can interact with the media library. For some ideas on what it can do, see the contributed examples on shaneh's page:
http://www.myplugins********activewinamp/doku.php/examples:root
edit: censored for some reason... it's myplugins . info /
osmosis
24th January 2010, 18:04
Fixed song history for Winamp 5.55+ (changed from ML DBIndex- to filename-based).
Removed now-redundant ML change checking code.
Minor cosmetic changes.Should have thought of this before now but without DBIndex being available, it doesn't get much more unique than filenames. Long story short, song history should work again and all is right in the world. :)
The AW wiki has been broken for a while, locking all the wiki docs from changes so the new version is attached below.
Cheers!
Rename attachment from *.txt to playlist_Party Shuffle.vbs and place in the AW Scripts directory.
DrO
25th January 2010, 06:47
Originally posted by osmosis
Should have thought of this before now but without DBIndex being available, it doesn't get much more unique than filenames.you're not the only one as i'd been struggling to get a hold of the original code which implemented the dbindex code. good to see things are working ok again for you.
-daz
osmosis
25th January 2010, 14:13
Thanks for digging around for me. Filenames seem to be a viable alternative thus far, and without the problems related to the ML DB changing. Only thing that could be an issue is some odd character in a filename screwing up the history list. Haven't tested very extensively on that front, just the basics like commas, etc. Unicode characters like arabic seem to make it revert to short filenames so that should be fine too.
Hopefully now that we have a working .dll and a work-around for DBIndex, things stay working for a while. :D
DrO
25th January 2010, 14:39
Originally posted by osmosis
make it revert to short file names so that should be fine tooaye, that should be safe as the short file name is meant to be unique and if you're using the complete file path then there shouldn't be a collision with things so i can't see much chance of an issue arising from it.
only issue i can see now with the plug-in is that it's not 5.34+ compatible in that it'll cause the taskbar to show ??? for unicode media -> details here (http://forums.winamp.com/showthread.php?postid=2154693#post2154693) though would probably need modified source from smk-ka so an overall update patch can be issued against the last lot of code available for the plug-in and i guess correctly version a newer dll (as i'm doubting we'll see a direct shaneh update).
-daz
gonemad
26th January 2010, 01:17
Originally posted by smk-ka
The recompiled plugin.
-Stefan
awesome dude.. that crash on exit has bothered me for like a year. thanks!
jimmid
6th February 2010, 05:46
Is there a script that lets you rightclick on a file in the playlist and set a pause or stop playing point, something like the "stop after current", but can be set on any future song. I have looked for a plugin that does it but can't find one, so wonderd if there was a script under AW that would do it?
schulze
8th February 2010, 09:21
Originally posted by smk-ka
The recompiled plugin.
-Stefan
thx a lot stefan!
i thought this wouldn't be fixed anymore.
now my winamp is complete again.
:up:
smk-ka
20th February 2010, 13:39
Originally posted by DrO
though would probably need modified source from smk-ka so an overall update patch can be issued against the last lot of code available for the plug-in
Hm, you actually only need to check out the source code from CVS (http://sourceforge.net/projects/activewinamp/develop) and apply my patch from above (http://forums.winamp.com/showthread.php?postid=2616942#post2616942, which is a one-liner). Or is there anything else you need?
DrO
22nd February 2010, 10:47
as i've none of the stuff installed for sorting out cvs/patches i'd hoped it'd be easier for you to make the required change on the SetWindowLong part (as detailed in the post) especially as your compile seems to work ok for everyone else. if not i'll have to find the time to install things to do it (had hoped for the easier option of someone else doing the work for a change, heh).
-daz
ryerman
3rd March 2010, 20:23
When I select items in the Media Library and select a script
from the "Send To" menu, it executes twice, concurrently.
Any thoughts on how to prevent this and/or why it happens?
The same script runs normally (once) from the "Scripts" menu
available in the Playlist Editor and also if I right click the track
in the Winamp now playing area and select the script from that "Send To" menu.
This trivial vbs script illustrates the problem on my machine:
x = GetSendToItems
for each track in x
msgbox track.filename
next
quit
Two message boxes appear, one on top of the other, for each selected item.
This script is unimportant but the structure it uses is common in other
useful scripts. They also execute twice.
What really puzzles me is that 2 executions occur from the Media Library "Send To" menu,
but only one occurs from the now playing "Send To" menu.
Maybe it has something to do with the GetSendToItems function or the send_to structure.
I'm not a programmer/developer so I can't investigate code.
I welcome any comments, solutions or insights.
I'm using Windows Vista SP2, Winamp 5.572 with Bento Skin, gen_activewa.dll as provided by smk-ka (in this thread)
osmosis
3rd March 2010, 22:26
Does it show in ActiveWinamp's Plugin Config window as running twice (ie. is the script shown twice in the status)?
ryerman
4th March 2010, 01:54
Thanks for the speedy reply.
Yes, the script is listed (filename only) twice in the "Running Scripts" area of the Script Control window when using the menu in the Media Library. However, it is listed only once when using the menu that is displayed after right clicking the track in the now playing area.
Also, if I run the script from the configuration window (ie. click "Run Script) it always runs once, but operates on the last selection that was chosen when running the script from either Send To menu, not on any subsequent selection made just before. And the full path to the script is shown, not just the filename.
osmosis
4th March 2010, 05:39
Intruiging bug. Unfortunately there's still not a lot of action around here. DrO and I'm sure more than a few others are hoping Stefan might polish up AW a bit but who knows.
Feel free to fire him off a private message with your bug info since I'm not sure how often he checks this thread.
ryerman
4th March 2010, 13:33
I did as you suggested. I hope Stefan (or somebody) is working on refining ActiveWinamp. It is an exceptionally useful and powerful plugin.
Bye for now,
Jim
stego
13th May 2010, 08:58
Can anybody please reupload the latest gen_activewa.dll?
Thanks in advance!
stego
ryerman
14th May 2010, 17:24
Concatenate the following 4 lines into one line. That is the web address where you can download the latest CVS version of gen_activewa.dll
www.
myplugins.
info/activewinamp/doku.
php
Latest does not imply recent. I believe that development stopped on this project and the author is no longer providing support (Just my gut feeling, I have no proof)
Post #629 in this thread had an amended gen_activewa.dll file. It's gone now but I have attached a copy.
Cheers
stego
14th May 2010, 17:54
Thank you very much.
I hoped, that I could get rid of the crash on exit. But it seems that it is still there :-/
bugger, looks like the forum upgrade lost the version smk-ka had uploaded into the post at http://forums.winamp.com/showthread.php?postid=2616942#post2616942. that had resolved the crash issue i thought so hopefully someone (i'd hope osmosis) has a copy and can upload it again. or is the version ryerman's uploaded the one smk-ka provided?
-daz
ryerman
15th May 2010, 00:56
is the version ryerman's uploaded the one smk-ka provided?
-daz
My intent was to upload a copy of the file that smk-ka provided. I believe that is what I did, but I can't swear on a stack of bibles. When I downloaded that file (from smk-ka) I was trying to address a problem as described in post #646 above and I was downloading copies from all over the place. Maybe I got mixed up. I never had a "crash issue" problem (still don't) but I run Windows Vista and my understanding is that the crashes occurred in Windows XP. The fact that stego reports crashes on exit seems to indicate the "amendedgen_activewa.zip" that I uploaded does not solve the crash on exit problem that was presumably solved by smk-ka. Maybe a PM to smk-ka and/or osmosis will produce a definitive copy of the elusive little bastard.;)
-ryerman
Amandio C
26th May 2010, 07:43
Hello. I would like to know how to write a script/batch file that will load a specific Milkdrop preset n times per second. Thank you for your help.
i really don't think there's anyway for a plug-in/script to do that to control Milkdrop as i can't see anything in Milkdrop's source code which allows for external controlling of script loading (unless it's possible to fake key presses to the Milkdrop window and effectively step through the preset loading menus to get what's required but that'd be evil).
-daz
Amandio C
26th May 2010, 20:36
It would be sufficient for me to have Milkdrop reload always the same preset, on a folder with just one preset. The command would be the equivalent to pressing the spacebar.
i don't think what you want can be done (i'd love to be proved wrong), not without hackery and forcing an update n times a second would affect Milkdrop and the system's performance in general. plus it does seem like a weird request anyway.
-daz
osmosis
27th May 2010, 14:49
I've disassembled the code and tracked the crash on close issue down to a missing CoInitialize() call in the CScriptManager destructor (CoCreateInstance() returned a - surprisingly - helpful error code). Recompiled with the attached patch applied and everything seems to work again. :)
-StefanThe recompiled plugin.
-StefanHere you go folks. :) Dang forum upgrade.. Shame smk-ka hasn't come back to give it that simple unicode patch as well.. :(
osmosis
27th May 2010, 15:04
Fixed song history for Winamp 5.55+ (changed from ML DBIndex- to filename-based).
Removed now-redundant ML change checking code.
Minor cosmetic changes.Should have thought of this before now but without DBIndex being available, it doesn't get much more unique than filenames. Long story short, song history should work again and all is right in the world. :)
The AW wiki has been broken for a while, locking all the wiki docs from changes so the new version is attached below.
Cheers!
Rename attachment from *.txt to playlist_Party Shuffle.vbs and place in the AW Scripts directory.And of course.. :D
Amandio C
29th May 2010, 03:15
Lol. I just managed to do it using a program for macros, Easy Macro Recorder, but would rather have something like a VB script. Thank you for the help.
fixinchik1975
18th July 2010, 20:03
can i change a track.comment field? why i cannot change this fields?
i want to change this field for audio & video files, so i dont need id3 field comment, i need to change this field in media library.
KClaisse
3rd November 2010, 12:49
Hey guys, I am not familiar with vbs at all and even after looking through the example I am still at a loss as to how to do this:
I have a python program I wrote that updates some online applications of mine with song information. I can either just constantly query winamp for new song info but its a bad way to do this. All I need to do with ActiveWinamp is pass track title, artist, and album to my program at the start of a song being played. Then for stopping/pausing It would pass the argument "stop" or "pause" respectively. I read on the activewinamp page that it is possible to use programs written in other languages, so maybe I can just use python directly? I doubt that though since everyone is using vbs heh.
Anyway, any help is greatly appreciated. Thanks.
KClaisse
3rd November 2010, 15:58
Ok I got that sorted after looking over the documentation, which wasnt too out of date tbh. Now the only problem I have left is getting my script to automatically load up into winamp when it starts. I put it in the scripts folder and it didnt load up, so then I created a scripts folder in here: %APPDATA%\Winamp\Plugins\ but it still didnt load up. I couldnt find any setting that allowed me to autoload either. Is there a different folder I should use?
I have winamp v5.581
osmosis
3rd November 2010, 16:04
%AppData%\Winamp\Plugins\Scripts\
and make sure it's named startup_<name>.vbs
If that doesn't work, put a playlist_<name>.vbs file in there and see if it shows up in the Scripts submenu in your Winamp playlist.. it could be that startup scripts have stopped working.
KClaisse
3rd November 2010, 16:07
%AppData%\Winamp\Plugins\Scripts\
and make sure it's named startup_<name>.vbs
If that doesn't work, put a playlist_<name>.vbs file in there and see if it shows up in the Scripts submenu in your Winamp playlist.. it could be that startup scripts have stopped working.
Nice! Added startup_ to the beginning and it loaded up at start. Thanks for the extremely quick reply too. :up:
I have one more question now: Is there an event for when Winamp shuts down? I didnt see it in the documentation.
EDIT: nvm, found it with the Type Library Explorer: Application.ApplicationExited
gonemad
30th November 2010, 21:34
Hey guys, I am not familiar with vbs at all and even after looking through the example I am still at a loss as to how to do this:
I have a python program I wrote that updates some online applications of mine with song information. I can either just constantly query winamp for new song info but its a bad way to do this. All I need to do with ActiveWinamp is pass track title, artist, and album to my program at the start of a song being played. Then for stopping/pausing It would pass the argument "stop" or "pause" respectively. I read on the activewinamp page that it is possible to use programs written in other languages, so maybe I can just use python directly? I doubt that though since everyone is using vbs heh.
Anyway, any help is greatly appreciated. Thanks.
the activewinamp.dll is a com object so it can be used with any language that works with COM
classact2575
8th January 2011, 17:47
Hey everyone-
After years of running RoboDJ, I ended up losing the plugin after my hard drive crashed. I reinstalled WinAmp on my new drive and was unable to find a copy of the plugin, so I've been suffering with the craptastic "shuffle" mode available with regular WinAmp.
I've tried to run the Active winamp plugin plus Party Shuffle, but haven't had much luck. I'm able to get everything to show up as described (e.g., right click in the playlist, hit "scripts," then "Party Shuffle," but it then comes up with "Error: Line 80, Type Mismatch: 'ubound.'"
I'm running WinAmp Lite 5.601. Any suggestions? Thanks!
-KC
osmosis
8th January 2011, 18:34
Lite as in "no media library" ? If so, that's the reason. If not, then I just recommend downloading the latest ActiveWinamp and Party Shuffle scripts from the above posts (http://forums.winamp.com/showthread.php?p=2666465#post2666465) (right-click, Save Target As), and try again. Oh any make sure you regsvr32 gen_activewa.dll from a elevated command prompt. Hopefully that helps as I redownloaded and it all works here on my end.
malcolmthenewt
12th January 2011, 17:51
I'm trying to create a script to send the selected file to audacity for editing, as far as I can work out, it should be fairly easy, but my scripting knowledge started about 2 days ago, so I'm struggling, any help would be greatly appreciated.
osmosis
12th January 2011, 20:56
hi malcolm. I recommend you check out some of the Examples from ShaneH's page (http://www.myplugins.info) (click ActiveWinamp, then Wiki Homepage) to get you started. In particular check out the MusicMatch as it contains running a program from a vbs script, then check out a sendto script, and the Notes and Documentation. As long as audacity allows commandline (probably does, most do) then it's a pretty straightforward little script, and that should be all you need.
Good luck! Oh, and welcome to the forums. :)
Stupifier
12th January 2011, 23:11
I need some help. I had not used ActiveWinamp is a very long time. I updated to the most recent version. None of the Scripts work. They all crash Winamp. I'm using Winamp 5.601. I attached my plug-in list below. I also attached a script that caused a crash.
I figure I'm just missing something stupid.....
osmosis
12th January 2011, 23:19
Well, the script certainly doesn't work over here... but it also doesn't cause a crash. All I can recommend is following my advice 4 posts up: make sure you have the crashfixed build of gen_activewa.dll from my post attachment, and make sure it's regsvr32 from an elevated command prompt.
Also worth noting you have a LOT of 3rd party plugins, so if after the above you still can't get it to work, do the obvious and try removing all the 3rd party plugins except AW and see if that works.
malcolmthenewt
13th January 2011, 01:03
Thank you for the reply, I'm starting to get the idea with this script, it works fine if the mp3s are in folders without spaces in the location, but not with spaces. What do I need to change in the script? Again, the help is much appreciated.
ryerman
13th January 2011, 01:42
What do I need to change in the script?
Probably double quotes around the variable "track" in the Call statement. But don't quote me.:) I'm a 'trial and error' rookie.
For what it's worth, I've attached my VBS script. You'll have to adapt it by changing the path to Audacity.
osmosis
13th January 2011, 13:16
Good job malcolm! You just need quotes around the file path like ryerman said. Since escaping quotes in VBS can get ugly and annoying, remember you can also use chr(34) :)
malcolmthenewt
13th January 2011, 18:36
lol, I just came back on to post my working script, if I'd logged in earlier, it wouldn't have taken me half as long, oh well. Thanks for everybody's help
T-pix
21st January 2011, 10:23
Hello everyone!
How can I get the list of enqueued tracks using script?
I looked the examples on MyPlugins but didn't find a suitable solution (may be because I'm new to VBScript)
osmosis
21st January 2011, 13:53
As long as you mean enqueue as in the next files in the playlist and not the JumpToFile plugin function, it's a pretty simple task.
here's an example from the Party Shuffle script of a way you can perform a function on every item following the current (playing) entry:
for i = playlist.position to playlist.count
if not arraycontains(songHistory, playlist.item(i).filename) then
addArtist(playlist.item(i).artist)
addSong(playlist.item(i).filename)
end if
next
osmosis
21st January 2011, 16:16
Added new check to skip missing files (due to deletion/changed paths), which would limit the available tracks.
Displays a warning for missing files, advising user to rescan ML and restart Party Shuffle to avoid any issues.Here's the result of me having a think about the old ML change checking code and the possibility of having missing files show up in the ML query. Also, 3.4 is a nice, even revision number. :D
The AW wiki has been broken for a while, locking many wiki docs from changes so the new version is attached below.
Cheers!
Rename attachment from *.txt to playlist_Party Shuffle.vbs and place in the AW Scripts directory.
T-pix
21st January 2011, 20:40
As long as you mean enqueue as in the next files in the playlist and not the JumpToFile plugin function, it's a pretty simple task.
Ah.. I didn't know that there is a difference.
I need exactly JumpToFile plugin queue.
osmosis
21st January 2011, 23:42
JumpToFile is a seperate plugin. You cannot access it.
osmosis
25th February 2011, 14:36
Just so people are aware, there may be a bizarre incompatibility with ActiveWinamp (especially Party Shuffle) and DrO's Playlist Undo plugin at the moment which can result in deletion of files previously played, without notification (and not to the Recycle Bin, fully deleted).
I can't say for sure, but it seems likely that the problem is caused by the FileSystemObject added in Party Shuffle v3.4 (which simply checks if a file exists) and some issue with the way it interacts with Playlist Undo's playlist backups/undo queue; so other ActiveWinamp scripts with FileSystemObjects may similarly cause this issue.
Disabling Playlist Undo (rename from .dll to .dll.off, etc.) will avoid/fix this issue. Or if you prefer, you may revert to Party Shuffle 3.3 (http://forums.winamp.com/showthread.php?p=2666474#post2666474).
Be careful, however, once these bad entries are added to the undo queue, they will continue to remain in the queue and possibly delete files until they have exited the queue (even between seperate Winamp instances if you have Playlist Undo set to preserve the queue) or until the queue is cleared (which I've found also appears to delete files).
I apologize for this unforseen issue, I only just noticed it this week and have myself probably lost ~100 random songs over the last month until I discovered it. DrO has been informed and it will be looked into when he can find the time to see whether the fault lies with ActiveWinamp or Playlist Undo and hopefully come up with some kind of solution.
Thanks.
Skurvy_Pirate
6th March 2011, 21:41
When I try to run this script Winamp crashes. I am using Win 7 64 bit. Anyone else have this issue?
osmosis
6th March 2011, 22:00
That usually happens when you haven't registered the AW plugin dll with Windows:
Elevated command prompt. Go to your plugin dir. "regsvr32 gen_activewa.dll" (without the quotes).
Skurvy_Pirate
7th March 2011, 04:33
Thanks! Working great now!
osmosis
24th May 2011, 16:06
sendto_Set Playcount.vbsx = GetSendToItems
if ubound(x,1) > 0 then
for each track in x
s = inputbox(track.title+vbCrLf+vbCrLf+"Currently: "+cStr(track.playcount),"Set Playcount",cStr(track.playcount))
if s <> empty then track.playcount = cInt(s)
next
end if
quit
This will run from the ML via SendTo, but not from the PL for some reason.. and for some reason the ML SendTo seems to trigger things twice, regardless of what is actually in the script.. so double dialog boxes. Anyone got any ideas?
martixy
10th June 2011, 14:36
http://forums.winamp.com/showthread.php?t=331171
Help? There are cases where this would be very helpful. For ex. duplicate songs, one of better quality, one of lesser, where you'd want the better quality one; OR songs that are meant to play one after the other.
SteelSureal
15th June 2011, 08:30
That usually happens when you haven't registered the AW plugin dll with Windows:
Elevated command prompt. Go to your plugin dir. "regsvr32 gen_activewa.dll" (without the quotes).
No seriously, what Osmosis said here.
I ran a shoutcast station for over 5 years with activewinamp interfacing with winamp to do a host of things. I haven't had it running since upgrading to windows 7 for a while now, and this was just one step of many, but you need to regsvr32 on the activewa dll in order to add it to your references in your c# project.
aurelbdx
30th June 2011, 04:16
Hi everybody,
I have a favor to ask you. Can you make me a scipt like “enqueue_random_albums” (Author: MarquisEXB ) but a modified script that displays only one song per album (or few mixed songs per album but not the full album) and without separators.
I would like a script that displays random files from media library to playlist but with the possibility to choose the genre, the years and the playcount like in this script.
on error resume next
Randomize
'dim i,j,Dict1,tracks,num,idxs
TheQuery=getMLQquery("type=0 &! (album ISEMPTY)")
msgbox TheQuery
mlq = medialibrary.runqueryarray(TheQuery)
Set Dict1 = CreateObject("Scripting.dictionary")
Dict1.CompareMode = BinaryCompare
i = 0
AllAlbums="" ' string that contains all album names
for each track in mlq
if instr(AllAlbums,ucase(track.album)) = 0 then
i = i + 1
AllAlbums=AllAlbums&vbcrlf& ucase(track.album)
Dict1(ucase(track.artist))=Dict1(ucase(track.artist)) & vbcrlf & _
CStr(i) & asc(178) & ucase(track.album)
end if
next
itms = Dict1.Items
numArt=ubound(itms)+1
num = CInt(InputBox("Albums: " & i & vbcrlf & _
"Artists: " & numArt & vbcrlf & _
"Choose the # of albums","#","3"))
if numart>=num then
do while (tracks<num)
safe = 0
do
safe=safe+1
Randomize
RandArtist = Int(numArt*Rnd) ' This is the artist
loop until (safe > 10000) or (instr(AllArtists,RandArtist & ";")=0)
AllArtists=AllArtists & RandArtist & ";"
'msgbox AllArtists & vbcrlf & "-" & itms(rand)
arrSong = Split(itms(RandArtist ), vbcrlf)
Randomize
TheAlbum = split(arrSong(int(ubound(arrSong)*RND +1)),asc(178) )(1)
InsertAlbum theAlbum
tracks=tracks+1
Loop
else
msgbox "Too many songs"
end if
quit
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''' FUNCTIONS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function InsertAlbum(thealbum)
mlq2 = medialibrary.runqueryarray("album = """ + thealbum + """")
Set Dict2 = CreateObject("Scripting.dictionary")
Dict2.CompareMode = BinaryCompare
i = 0
min=1000000
max=0
' This section is to sort by track number.
for each song in mlq2
i=i+1
theTrack=song.track
Dict1(theTrack)=i
if theTrack<min then
min=theTrack
end if
if theTrack>Max then
max=theTrack
end if
next
for z= min to max
if len(dict1(z)) > 0 then
mlq2(dict1(z)).enqueue
end if
next 'z
set sep = LoadItem("X:-- " & thealbum & " (" & ubound(mlq2) & ") --------------------------")
sep.insert(playlist.count)
mlq2=""
end function
private function getMLQquery(strInitial)
' This asks the user some questions so that
' you can choose music as you see fit.
dim genres,years,ratings,extra
genres=cSTR(InputBox("Genre(s) BEGINS with... ?","GENRES","alt,new,punk,lo,hip-r,ska"))
Randomize
ranYear = int(rnd()*datediff("yyyy", #01-01-1977#, now())) + 1977
years=cSTR(INputBox("Year? [ex: > 2000) -- or > 1995 AND Year < 2000]","YEAR","year >= " & ranYear))
ratings = cSTR(InputBox("Ratings?","Rating","rating > 1 "))
Extra=cSTR(INputBox("Extra? [ex: & (lastplay < [3 weeks ago] OR playcount < 1)","EXTRA","(lastplay < [3 weeks ago] OR playcount < 1)"))
if len(extra) > 0 then
extra = " & (" & extra & ") "
end if
if len(ratings) > 0 then
ratings = " & (" & ratings & ") "
end if
if len(years) > 0 then
years = " & (" & years & ") "
end if
if len(genres) > 0 then
genre=split(genres,",")
if ubound(genre) >0 then
genreline="& ("
for each onegenre in genre
genreline=genreline & " genre begins """ & onegenre & """ OR "
next
genreline = genreline & " Genre begins "" QQQ "") "
else
genreline="& GENRE BEGINS """ + genre(0) +""""
end if
else
genreline=""
end if
GetMLQquery= strInitial &ratings & genreline & years &extra
end function
Thank you in advance and sorry for my English.
- Aurel -
osmosis
15th September 2011, 22:37
one song per album, without separators, choose the genre, the years and the playcount
Aurel: you can do all of that with Party Shuffle (http://forums.winamp.com/showthread.php?p=2666474#post2666474).
aurelbdx
15th September 2011, 22:48
thanks Osmosis but with Party Shuffle I can't to choose genre, years and playcount
osmosis
15th September 2011, 22:50
Yes you can, check the RATE CONFIG CODE at the end of the script. Your files don't actually need to be rated, this is how the script works. It adjusts the likelihood the song will be played based on your criteria; this includes genre, year and playcount.
If you want a pulldown then you could always add that in too like in Marquis' excellent script.
aurelbdx
15th September 2011, 23:05
I would like this function:
private function getMLQquery(strInitial)
' This asks the user some questions so that
' you can choose music as you see fit.
dim genres,years,ratings,extra
genres=cSTR(InputBox("Genre(s) BEGINS with... ?","GENRES","alt,new,punk,lo,hip-r,ska"))
Randomize
ranYear = int(rnd()*datediff("yyyy", #01-01-1977#, now())) + 1977
years=cSTR(INputBox("Year? [ex: > 2000) -- or > 1995 AND Year < 2000]","YEAR","year >= " & ranYear))
ratings = cSTR(InputBox("Ratings?","Rating","rating > 1 "))
Extra=cSTR(INputBox("Extra? [ex: & (lastplay < [3 weeks ago] OR playcount < 1)","EXTRA","(lastplay < [3 weeks ago] OR playcount < 1)"))
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.