|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I have the following menu menu * {
Who2.1 : {
set %chan $iif($chan,$v1,$null)
.who2 $iif($snick(%chan,0),$snicks,$iif($nick,$nick))
}
}
which works fine for the most part, however, if possible, I'd like it to automatically grab the nick of a person that sends me a pm. At the moment, if I select Who2.1 in a pm window, I still have to enter the name manually.
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
RusselB? your asking this question? Well here you go dude on *:OPEN:?:{ %n = $nick } or whatever 
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
menu * {
Who2.1 : {
var %d $iif($chan || $query($active),$v1)
.who2 $iif($snick(%d,0),$snicks,%d)
}
} You can do something like that but if the active window is a status window for exemple, the $iif will return $null
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Thanks for the suggestion, but I need the information to be set when the menu is called, so using a different event is, to the best of my knowledge, not an option.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
hmm.. thanks.. I'll give it a try, and it doesn't matter if the $iif returns $null for the status window, as there is a prompt to fill in nick(s) if none are supplied.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Two alternatives (the second one is if you want it to work in older mIRCs that don't have $v1):
$iif($chan,$v1,$nick) $iif($chan,$chan,$nick)
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
Umm, $nick won't be set in a query window (at least not in my tests). $active.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Yeah, you're right. Use it as $active. I usually use that method when text is received, which *would* have $nick for a query window.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|