mIRC Home    About    Download    Register    News    Help

Print Thread
#18982 13/04/03 02:41 AM
Joined: Feb 2003
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 28
in the help file it reads:


on 1:CLOSE:@:/echo -s Just closed $target custom window

The above triggers when a custom window is closed. The OPEN event does not trigger for custom windows.


what i need is a substitute for the open @window event, since you cannot get it with 'on'.

any ideas?


------------------
*** ArcticFire ***
#18983 13/04/03 03:52 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Code:
alias window {
  if $isid { return }
  var %a = $wildtok($1-,@*,1,32)
  if !$window(%a) { .signal windowopen %a }
  !window $1-
}
on *:signal:windowopen:{
  echo -a Here is a substitute 'on open' event for $1
}

#18984 13/04/03 03:57 AM
Joined: Feb 2003
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 28
thats good, but a few problems occured.

1) it doesn't work with /debugs (it only works for actually /windows). is there anything i could change/add so all custom windows are supported?

2) it counts for all windows, not just custom windows. what i mean by this is that if i use that echo, it will appear on all windows i click on (channel, query, etc.). is there anything i can do about this?

Last edited by DrainBamaged; 13/04/03 04:05 AM.

------------------
*** ArcticFire ***
#18985 13/04/03 04:04 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
A slight mod to only trigger if window command succeeds. If the /window command fails it will halt with the error (e.g. "* /window: invalid parameters") and not trigger the signal.
Code:
alias window {
  if $isid { return }
  var %a = $wildtok($1-,@*,1,32),%b = $window(%a)
  !window $1-
  if !%b { .signal windowopen %a }
}
on *:signal:windowopen:{
  echo -a Here is a substitute 'on open' event for $1
}


"only one problem; it doesn't work with /debugs "
alias debug { blahblah... } smile

#18986 13/04/03 04:09 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
"is there anything i can do about this?"
Code:
  if %a && !%b { .signal.... }

#18987 13/04/03 04:09 AM
Joined: Feb 2003
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 28
nvm this post. we were posting our msg's at the same time, so you answered my question. thanks for all your help laugh

Last edited by DrainBamaged; 13/04/03 04:10 AM.

------------------
*** ArcticFire ***

Link Copied to Clipboard