Old 21st February 2002, 19:52   #1
Russ
Mostly Harmless
(Alumni)
 
Join Date: Jan 2001
Location: UK
Posts: 2,319
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

For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave.
|Musicbrainz|Audioscrobbler|last.fm|
Russ is offline  
Old 22nd February 2002, 05:51   #2
Rocker
Hiding in plain sight (mod)
 
Join Date: Jun 2000
Location: Melbourne, Australia
Posts: 9,910
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......
Rocker is offline  
Old 22nd February 2002, 08:42   #3
Russ
Mostly Harmless
(Alumni)
 
Join Date: Jan 2001
Location: UK
Posts: 2,319
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

For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave.
|Musicbrainz|Audioscrobbler|last.fm|
Russ is offline  
Old 22nd February 2002, 09:13   #4
Rocker
Hiding in plain sight (mod)
 
Join Date: Jun 2000
Location: Melbourne, Australia
Posts: 9,910
w00t....I only had the server bit bork
heh
Rocker is offline  
Old 24th February 2002, 21:18   #5
kode54
Senior Member
 
kode54's Avatar
 
Join Date: Feb 2001
Location: Riverside, CA, USA
Posts: 155
Send a message via ICQ to kode54 Send a message via AIM to kode54
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.
Attached Files
File Type: txt mircex_excerpt.txt (1.2 KB, 136 views)
kode54 is offline  
Old 25th February 2002, 07:15   #6
Russ
Mostly Harmless
(Alumni)
 
Join Date: Jan 2001
Location: UK
Posts: 2,319
To be honest, it looks very attractive because it doesn't use DDE - 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 .

For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave.
|Musicbrainz|Audioscrobbler|last.fm|
Russ is offline  
Old 16th March 2002, 10:27   #7
kode54
Senior Member
 
kode54's Avatar
 
Join Date: Feb 2001
Location: Riverside, CA, USA
Posts: 155
Send a message via ICQ to kode54 Send a message via AIM to kode54
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 is offline  
Old 16th March 2002, 10:39   #8
kode54
Senior Member
 
kode54's Avatar
 
Join Date: Feb 2001
Location: Riverside, CA, USA
Posts: 155
Send a message via ICQ to kode54 Send a message via AIM to kode54
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.
kode54 is offline  
Old 16th March 2002, 10:45   #9
mc^^^^
Forum King
 
mc^^^^'s Avatar
 
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,608
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
also clolours and boldness would be great if they could be implemented.

mc^^^^ is offline  
Old 16th March 2002, 10:50   #10
kode54
Senior Member
 
kode54's Avatar
 
Join Date: Feb 2001
Location: Riverside, CA, USA
Posts: 155
Send a message via ICQ to kode54 Send a message via AIM to kode54
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
kode54 is offline  
Old 22nd March 2002, 16:33   #11
Schlirf
Junior Member
 
Join Date: Jun 2001
Location: Brussels, Belgium
Posts: 26
Send a message via ICQ to Schlirf
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++)
Schlirf is offline  
Old 22nd March 2002, 16:37   #12
Russ
Mostly Harmless
(Alumni)
 
Join Date: Jan 2001
Location: UK
Posts: 2,319
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.

For long you live and high you fly, but only if you ride the tide, and balanced on the biggest wave you race towards an early grave.
|Musicbrainz|Audioscrobbler|last.fm|
Russ is offline  
Old 22nd March 2002, 17:00   #13
Schlirf
Junior Member
 
Join Date: Jun 2001
Location: Brussels, Belgium
Posts: 26
Send a message via ICQ to Schlirf
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...
Schlirf is offline  
Old 22nd March 2002, 17:19   #14
schweitn
Winamp3 Component Guuuru
Beta Team
 
schweitn's Avatar
 
Join Date: Dec 2000
Location: Milwaukee, WI
Posts: 1,068
Send a message via AIM to schweitn Send a message via Yahoo to schweitn
If all you're looking for is the length of the current song...

Try api->core_getLength( ... )

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
- Albert Einstein

Winamp 3 Projects | Winamp 2x Plugin Manager | Explorer Playlist | FileSystem Object | Shoutcast List | Sashimi
schweitn is offline  
 
Go Back   Winamp & Shoutcast Forums > Winamp3 > Winamp3 Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump