mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 37
C
cgfiend Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2003
Posts: 37
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.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
window -a $+(",$$lactive,") should do the trick.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Feb 2004
Posts: 124
T
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
on *:ACTIVE:*:set %lactive $iif($lactive,$lactive,$active)

Last edited by TonyTheTiger; 03/08/04 04:09 PM.
Joined: Mar 2003
Posts: 37
C
cgfiend Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2003
Posts: 37
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

Joined: Mar 2003
Posts: 37
C
cgfiend Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2003
Posts: 37
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.

Joined: Feb 2004
Posts: 124
T
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
Quite alright .. glad you got it worked out smile

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.


Link Copied to Clipboard