$submenu

From Scriptwiki
Jump to: navigation, search

This identifier is used for created dynamically generated submenus for mIRC Popup Menus.'

$submenu($identifier($1))

When using this as the name of a sub-menu, $identifier will be called with $1 starting as "begin" and then becoming a series of numbers starting at 1 and increasing until nothing is returned, then it is called with $1 being "end."

See the example below for clarification.

Example

menu nicklist,query { 
 Channels
 .$submenu($allchannels($1))
}
alias -l allchannels {
 if ($1 == begin || $1 == end) { return - }
 elseif ($1 isnum 1-) return $comchan($me,$1) $+ :echo -a This is my channel command.
}