mIRC Home    About    Download    Register    News    Help

Print Thread
pm menu question #196904 25/03/08 12:19 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I have the following menu
Code:
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.

Re: pm menu question [Re: RusselB] #196907 25/03/08 12:58 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
RusselB? your asking this question? Well here you go dude

on *:OPEN:?:{ %n = $nick }

or whatever wink


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: pm menu question [Re: RusselB] #196908 25/03/08 01:03 AM
Joined: Jul 2006
Posts: 3,890
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,890
Code:
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
Re: pm menu question [Re: Lpfix5] #196909 25/03/08 01:26 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
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.

Re: pm menu question [Re: Wims] #196910 25/03/08 01:28 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
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.

Re: pm menu question [Re: RusselB] #196913 25/03/08 02:45 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Re: pm menu question [Re: Riamus2] #196923 25/03/08 12:25 PM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Umm, $nick won't be set in a query window (at least not in my tests). $active.

Re: pm menu question [Re: Bekar] #196935 25/03/08 11:44 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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