Just reporting a minor, if rather inconvenient, bug. It occurs in my mIRC v6.12. Could you get round to tweaking this some time, Khaled?
It occurs when using the $submenu() identifier to dynamically create a submenu. Unless the specified submenu alias returns a hyphen '-' when $1 is 'begin', thereby forcing the submenu to begin with a seperator, the first item in the submenu (returned when $1 is 1) will not perform the command(s) specified when you click on it, and mIRC will merely emit a beep.
Note that this bug ONLY occurs when trying to use $submenu() in popups.ini (not via a remotes menu) and in the Menu Bar popups. Because this bug doesn't occur with all other uses of $submenu(), it seems very likely to be a coding error rather than intended behaviour.
Steps to reproduce:
1. Add this to a loaded remotes file:
alias menutest {
;We're not returning a hyphen '-' as we don't want to start/end with a seperator
if ($1 == begin) || ($1 == end) return
if $1 == 1 { return Broken:echo -a This is broken... you shouldn't see this text. }
if $1 == 2 { return Working:echo -a You should, however, see this. }
}
2. Go to 'Popups' in the scripts editor, view the Menu Bar popups.
3. Add this to the Menu Bar popups:
Menu test
.$submenu($menutest($1))
4. Click on your Menu Bar popup menu | Menu test | Broken.
5. Click on your Menu Bar popup menu | Menu test | Working.
Clicking on Broken should simply emit a beep, whereas clicking on Working actually executes the echo command as it's supposed to.
Both commands WILL work if hyphen '-' is returned by the submenu alias when $1 is 'begin', but that forces the submenu to begin with a seperator if there's something above it, and I don't want it to begin with a seperator.