Author | Message | Time |
---|---|---|
JaMi | Could anyone hook me up with a halfway decent wimamp mod for Vb? I've tried 2 or 3 different ones but they are overly buggy, and have the tendecy to produce mass error boxes, any help would be appreciated | January 16, 2003, 12:44 AM |
MesiaH | just use an api spy and make ur own, its way more fun! | January 16, 2003, 1:58 AM |
indulgence | There is documentation on how to interact with Winamp 2.x at winamp dev site... You just use SendMessage... really ez | January 16, 2003, 5:21 AM |
Yoni | A year (exactly) old, but it should still work: http://www.valhallalegends.com/yoni/SampleHDL.zip | January 16, 2003, 10:04 AM |
JaMi | thanx for the effort yoni, but that was for c++ and probablly wouldnt mesh together with the rest of my vb project very well :p | January 16, 2003, 11:50 AM |
iago | hmm.. I have one written in C++, but all it is is a few SendMessage calls.. I'll find you the source when I get home tonight, if you want. All you have to do is declare SendMessage in VB, and the rest translates very nicely. | January 16, 2003, 11:59 AM |
iago | Ok, sorry I took so long, I forgout about you :P This is in c++, but it's really easy to convert it; all you really need are the SendMessages, and I would very much suggest you DO NOT do it this way, with the strcmp() at every line; that's just stupid, and I have to fix it :) Without further ado, here is, quite possibly, the worst c++ code you'll ever see: [pre] #define WS_VOLUMEUP 40058 #define WS_VOLUMEDOWN 40059 #define WS_PREV 40044 #define WS_NEXT 40048 #define WS_PLAY 40045 #define WS_PAUSE 40046 #define WS_STOP 40047 #define WS_FFWD 40060 #define WS_RWND 40061 #define MAX 128 bool Winamp(char *command) { //A return value of 1 indicates good //0 means bad if(!(strcmp(command, "next"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_NEXT, NULL); command = "song"; } else if(!(strcmp(command, "prev"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_PREV, NULL); command = "song"; } else if(!(strcmp(command, "volup"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_VOLUMEUP, NULL); return 1; } else if(!(strcmp(command, "voldown"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_VOLUMEDOWN, NULL); return 1; } else if(!(strcmp(command, "play"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_PLAY, NULL); command = "song"; } else if(!(strcmp(command, "pause"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_PAUSE, NULL); return 1; } else if(!(strcmp(command, "stop"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_STOP, NULL); return 1; } else if(!(strcmp(command, "ffwd"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_FFWD, NULL); return 1; } else if(!(strcmp(command, "rwnd"))) { SendMessage(FindWindow("Winamp v1.x", NULL), WM_COMMAND, WS_RWND, NULL); return 1; } if(!strcmp(command, "song")) { char title[MAX]; GetWindowText(FindWindow("Winamp v1.x", NULL), title, MAX); DisplayOnScreen(title); return 1; } return 0; } [/pre] | January 17, 2003, 2:44 PM |
JaMi | lol thank ya much that works rather well, with apispy + that id say i managed to make it work well enough that i dont get error's all the time anymore :p umm and since im on the topic, any help with accessing winamp's playlist for like searching through it for a certain song? or have i just not tinkered with the apispy long enough? | January 17, 2003, 2:59 PM |
Atom | tinker more. If that spy doesnt make it INCREDIBLY EASY ENOUGH for you then use patorjk's api spy, www.patorjk.com it even generates the code for you, although the code isnt the cleanest | January 17, 2003, 8:43 PM |
MesiaH | IIRC, winamp doesnt show the name of the song in the list, just the number, so youll only be able to search and play by its position in the playlist... | January 17, 2003, 11:25 PM |
JaMi | erm chewbot has `play *saliva* type command so if thats not coming from winamp wheres it coming from? | January 18, 2003, 3:08 AM |
Yoni | [quote]A year (exactly) old, but it should still work: http://www.valhallalegends.com/yoni/SampleHDL.zip[/quote] erm... *tries to figure out why I posted this here* HDLs have nothing to do with winamp? ??? | January 18, 2003, 8:52 AM |
iago | Well, you CAN use an HDL to control Winamp (maybe provide an even easier wrapper to catch messages), but it looks to me like you're just advertising :P | January 18, 2003, 3:26 PM |