QUOTE(Lampen @ Sep 19 2003, 09:42 PM)
I want to be able to type /foobar or similar in mirc, and then it should display what song im listening to.
I dont want to spam all channels, i dont want to spam what song im listening to every time foobar changes song.
How do I do that with amip ?
This is described in AMIP Quick Start:
...
3. Setting up options "I want to announce manually, only when I press hotkey in mIRC or type some command, how can I accomplish this?"
Well, this question is the most common one, so read very carefully =)
The first thing you probably want to do is to stop automatic announcing. There are several ways. You can just disable IRC integration or remove all the text from the preset. In the second case please be sure to choose some other preset than the first one, because the first one will be restored to the default value.
OK, now AMIP doesn't announce automatically and we need to make mIRC to announce when we press hotkey (or type some command). Fortunately AMIP is flexible enough to pass its variables to mIRC upon request. For the detailed information you can refer to the mIRC Scripting section, here I will describe the basics.
The easiest way is to use $dde variable with format option. Open mIRC aliases editor and type in the following:
F12 /me $dde(mPlug,format,"np:_%name_[%min:%sec~m/%br~Kbps/%sr~KHz]")
Now every time you hit F12, you'll get just the same as described in the previous chapter.
F12 is the hotkey, you can use some command instead of this, for example /mp3, /me is a mIRC command to say what you are doing. $dde has 3 arguments: mPlug is the AMIP dde server name, format is AMIP internal command, it tells AMIP that it should interpret the third parameter as a usual preset. The third parameter is the text with variables you want to be printed in mIRC. There is one important limitation, you can't use spaces in this parameter, all spaces must be replaced with the underscores. You can use all the other AMIP variables in it like in the usual preset.
In the mIRC scripting section you will find the complete script sample using this approach. It sets mIRC variables to AMIP variables using $dde and then build output line using only scripting language. This one is for advanced users who are keen at mIRC scripting. You can get full control over the AMIP options, get all the variables, control Winamp from your script, etc.
...
In the above example you can use any alias instead of F12, for example:
/foobar /me $dde(mPlug,format,"np:_%name_[%min:%sec~m/%br~Kbps/%sr~KHz]")
Isn't it too hard to read help? =)