mIRC Homepage
Posted By: Skeletor popup menu confusion - 15/11/08 08:14 PM
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.
Posted By: 5618 Re: popup menu confusion - 15/11/08 08:31 PM
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?)
Posted By: Skeletor Re: popup menu confusion - 15/11/08 08:35 PM
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.
Posted By: 5618 Re: popup menu confusion - 15/11/08 08:58 PM
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.
Posted By: Skeletor Re: popup menu confusion - 15/11/08 09:07 PM
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.
© mIRC Discussion Forums