mIRC Home    About    Download    Register    News    Help

Topic Options
#21196 - 27/04/03 06:16 PM ability to use $1- in $submenu
phobos Offline
Self-satisified door

Registered: 27/04/03
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

Top
#21197 - 27/04/03 11:37 PM Re: ability to use $1- in $submenu
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
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

Top
#21198 - 28/04/03 07:04 PM Re: ability to use $1- in $submenu
Doqnach Offline
Hoopy frood

Registered: 18/01/03
Posts: 1063
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!

Top
#21199 - 03/05/03 12:10 AM Re: ability to use $1- in $submenu
phobos Offline
Self-satisified door

Registered: 27/04/03
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


Top
#21200 - 03/05/03 12:24 AM Re: ability to use $1- in $submenu
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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

Top