mIRC Home    About    Download    Register    News    Help

Print Thread
popup menu confusion #206455 15/11/08 08:14 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Hey all, I have a script that has:

Code:
menu menubar,status,channel {
  AutoJoin Wizard
  .$style($iif($group(#ajwiz).status == on,1)) Active:$iif($group(#ajwiz).status == on,.disable,.enable) #ajwiz
  .-
  .Configure:ajwiz
  .-
  .$iif(#,Add This Channel):ajwiz.add.channel # | return $input(# added to the autojoin list successfully!,io,Channel Added)
}


I have tried to put it into one of my popups menus.

Code:
$iif(#,Add This Channel):ajwiz.add.channel # | return $input(# added to the autojoin list successfully!,io,Channel Added)


And this is the error that is returned:

Code:
(AJWIZ.ADD.CHANNEL) invalid command


It only returns an error when I use my popup menu, not the "menu menubar,status,channel" How can this be fixed?

Thanks in advance,


Matt.


sub-zero.homeip.net:6667

Re: popup menu confusion [Re: Skeletor] #206456 15/11/08 08:31 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
From the looks of it the alias "ajwiz.add.channel" is located in the group #ajwiz. That group needs to be enabled in order for the alias to be usable.

(right?)

Re: popup menu confusion [Re: 5618] #206457 15/11/08 08:35 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
The needed alias

Code:
alias -l ajwiz.add.channel {
  var %i = $iif($1,$1,$input(Enter the name of a channel that you would like to add to the AutoJoin list. $+ $crlf $+ $crlf $+ (ie: #Funkytimes),eio,Create New Entry)), %c
  if (%i) {
    %c = $remove($iif($left(%i,1) == $chr(35),%i,$chr(35) $+ %i),$chr(32))
    ajwiz.write Channels %c 1
    ajwiz.write %c $+ Nets All 1
    if ($dialog(ajwiz)) { ajwiz.load.channels }
  }
}

menu menubar,status,channel {
  AutoJoin Wizard
  .$style($iif($group(#ajwiz).status == on,1)) Active:$iif($group(#ajwiz).status == on,.disable,.enable) #ajwiz
  .-
  .Configure:ajwiz
  .-
[b]  .$iif(#,Add This Channel):ajwiz.add.channel # | return $input(# added to the autojoin list successfully!,io,Channel Added)[/b]
}



The highlighted is what I would like in my channel popup.


Matt.


sub-zero.homeip.net:6667

Re: popup menu confusion [Re: Skeletor] #206458 15/11/08 08:58 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Are you using your new menu in the same file? If not, that would explain your problem since the alias in question is a local alias (alias -l; l for local) only and not usable by other scripts.

Re: popup menu confusion [Re: 5618] #206459 15/11/08 09:07 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
alias -l ajwiz.add.channel {

Thanks for the heads up, I removed the highlighted.

I am using popus.ini to call that alias, all sort now though.


Cheers
Matt.


sub-zero.homeip.net:6667