mIRC Home    About    Download    Register    News    Help

Print Thread
#66949 07/01/04 03:50 PM
Joined: Jul 2003
Posts: 18
jez Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jul 2003
Posts: 18
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? smile

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. smile


== Jez ==
"Each victory is a missed opportunity to die..."
#66950 08/01/04 02:08 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Yeah, this is an older bug (which was never fixed apparently). Until it's fixed, you can use
Code:
...
if $1 isin beginend { return : }
...


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard