mIRC Homepage
My script makes the last active window the active one once I click on an item in a listbox in a custom window (using /window -a...). The problem is, when I double click on the listbox after coming from a non-MIRC window I get an error /window: insufficient parameters because the last active window was not identified by MIRC, being foreign to MIRC. So, how do I trap this error and stop this from happening? I've tried to check if $lactive != $null but that doesn't work despite the fact that the $lactive returns nothing in this particular situation. Any ideas? I don't want my script to generate that kind of error.
window -a $+(",$$lactive,") should do the trick.
on *:ACTIVE:*:set %lactive $iif($lactive,$lactive,$active)
Thanks. Works like a charm. I had been using something similar...

/window -a $iif(* * iswm $lactive,$+(",$lactive,"),$lactive)

...I had pulled it from the forum. It worked, but not for the foreign window problem. Yours cures it. Who'da thunk it...two quotes would've made the difference. lol
Tony... thanks for the suggestion, but I'd rather not use a variable if I don't need to. smile The first suggestion works great.
Quite alright .. glad you got it worked out smile
mIRC v6.16, versions.txt
  • 38.Fixed /window not handling quotes around =chat window names.
The $iif() distinction is no longer needed, because /window now has a better support for quoted window names.
© mIRC Discussion Forums