Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Winamp3 Discussion (http://forums.winamp.com/forumdisplay.php?f=57)
-   -   Winamp3/mIRC plugin (http://forums.winamp.com/showthread.php?t=76902)

Russ 21st February 2002 19:52

Winamp3/mIRC plugin
 
I've very quickly knocked up a plugin to talk to mIRC from Winamp3 beta 3 using DDE, as there aren't any around at the moment, but it has a few bugs. It won't crash, but there are 2 feature limitations:

- You can only send "Artist - Title" - do this by putting %s in the command box in configurification.

- It won't do /me or /say for some reason - you have to specifically direct it to a channel (i.e. "/msg #chan I am listening to %s") or use /ame or /amsg. This is due to a problem with the internal Winamp DDE command I'm using (api->sendDdeCommand() for all you Wasabi junkies - it works, but there aren't any options), and I'm too lazy to learn the proper Windows API method.

Get it here: http://russ.garrett.co.uk/wa3/irc1.wac

Rocker 22nd February 2002 05:51

yay......

nice work RUSS....


i can't get it to work though....

maybe you should write a little readme with instructions on how to use it......

Russ 22nd February 2002 08:42

Here is an impromtu readme:

Copy the wac over into your winamp3\wacs directory, and fire Winamp up (beta 3 only!). In Winamp, hit ctrl+p, and it should appear at the side as "IRC Plugin" (if it's not, you, or I've done something wrong ;)). Click on that, and check the "Enable DDE" checkbox.

The "Server Name" box should be set to the DDE servername of your mirc instance. On plain mirc this is usually "mIRC", but some scripts change it - type /ddeserver in mirc to find out.

The "Command" box should be set to the command you wish to send. The string "%s" in this will be replaced by "Artist - Title". This command will be sent as if it was typed in the status window, so "/me something" won't work, nor will "/say something". I use "/msg #chan I am listening to %s".

If the command doesn't work, check your mirc status window for error messages. If it still doesn't work, try typing "/ddeserver on mIRC".

NOTE: There is a significant glitch in wa3's ID3 reading, namely, it doesn't sometimes. The best bet is to drag songs into the playlist to play them. Opening them by double-clicking on the file doesn't always work. Not my fault :).

NOTE: This will only work with one copy of mIRC! Others should have DDE turned off (/ddeserver off). If you want more reliable usage, try my Info File Plugin - the only proviso is that the songs aren't announced automatically, you have to manually type a command to do it (I prefer it this way).

Check out my new wa3 components site at http://russ.garrett.co.uk/wa3

Rocker 22nd February 2002 09:13

w00t....I only had the server bit bork
heh

kode54 24th February 2002 21:18

1 Attachment(s)
Have you considered the new mIRC DDE API? I have a nice piece of code I cooked up to interface to it. The only problem is, the window name you have to search for varies. "mIRC32" for 5.9x and "mIRC" for 6.x. The command string is passed through a file mapped memory space.


Some excerpts are attached.

The enum finds the main mIRC window, then steps through to the currently active channel or query. Double slash is necessary in the actual string because commands sent this way are parsed as if they were typed or pasted into the window they were sent to.

Russ 25th February 2002 07:15

To be honest, it looks very attractive because it doesn't use DDE :D - DDE is quite messy, and that uses a much neater sendmessage method. I'll give it a go at some point, but I've got mock exams this week, so don't expect much ;).

kode54 16th March 2002 10:27

As I said, you can use that code in various ways to enumerate window handles.

The command is evaluated by whichever window you send the message to. If the main mIRC window, it goes to the status command line. If a channel, chat, or query, behaves as if evaluated from the respective command prompt. You can use /describe, or find the correct window through enumeration and send it there with /me. You can also use that code as-is, which sends to the currently active MDI window.

kode54 16th March 2002 10:39

It means you can program the plug-in to send the message to a specific channel or, as I did, send it to the active channel/query, without use of /describe <target>. You can also remove those extra find/child steps to send directly to the status window.

Whichever channel/query window you send to, mIRC will behave as if you pasted the command string to that window. Hence why I also add that extra slash to commands that start with it, otherwise it does not evaluate any special $ aliases or | separators.

mc^^^^ 16th March 2002 10:45

just a request but i think there needs to be the option to make it like 10 seconds into the song it sends to mirc, that way the channel doesnt get flooded by me selecting a better song.

its great so far, and your the first:up: :up: :up:
also clolours and boldness would be great if they could be implemented.

kode54 16th March 2002 10:50

You can also do that on the script side.


.timer 1 10 me is listening to blah


in script, or precede with "/echo -q . |" and substitute %s for blah

Schlirf 22nd March 2002 16:33

Can we expect an updated version which could read as well the total lenght of the song?

The line seems to be commented in the source file, and I failed to rebuild it with Borland C++ Builder (I don't have Visual C++)

Russ 22nd March 2002 16:37

Erm, no, because the fields which return an integer don't seem to work for me - they just return garbage. If anyone else can get it to work, give me an e-mail and I'll fix my plugin.

Schlirf 22nd March 2002 17:00

I saw that before, I wanted to build it myself to try to understand if this "garbage" could have a meaning, such as the ascii value of the characters or something...

schweitn 22nd March 2002 17:19

If all you're looking for is the length of the current song...

Try api->core_getLength( ... )


All times are GMT. The time now is 20:46.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.