mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 4
P
phobos Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Apr 2003
Posts: 4
khaled writes to use $submenu only with this syntax
$submenu($name($1))
but sometimes you need $1$2 ... identifiers given from your menu to the alias. I hope v6.04 will supports this.

$submenu(<aliasname>,<$1 variables>)

i.e.

menu * {
test
.$submenu(name,$active,$1-)
}

alias name {
echo -s test counter $1
echo -s test active $2
echo -s test $!!1- from menu $3-
if ($1 == 1) return test:test
}

the counter will be put in $1
the variables in $2-

this useage is also compatible with the current version...

best regards phobos

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Already possible, just 'escape' $1, $2 etc with "!" when passing them to the alias:
Code:
menu query,nicklist {
  10-item test
  .$submenu($test($1,$!1-))
}

alias -l test if $1 isnum 1-10 { return Item $1: echo -s $2- }


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
also the ability to use nested $submenu's...

which can easely be done if you just let $submenu also return the .... in front of the menu options... that way you can easely make $submenu go several menu's deep...


If it ain't broken, don't fix it!
Joined: Apr 2003
Posts: 4
P
phobos Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Apr 2003
Posts: 4
befor posting I searched a lot, but I did not find this "feature"

were is it documented?

why is the first $1 used? the "submenu" funtion can handle the repeated call of the alias by itself

how to do a list of menuitems with subfolders

submenu
.sumneuitem1
..add
..del
.submenuitem2
..add
..del
...
and so on


Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
You can't do it, thats why you didn't find it...

Quote:

also the ability to use nested $submenu's...

which can easely be done if you just let $submenu also return the .... in front of the menu options... that way you can easely make $submenu go several menu's deep...


May i read from the help file?

Note: You can't use this to create nested submenus, it will only build one single submenu.


-KingTomato

Link Copied to Clipboard