mIRC Home    About    Download    Register    News    Help

Print Thread
Echo to active window after parting #209760 22/02/09 10:04 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
I have a script that will unset a variable once I leave a channel. It should then echo that the variable was unset into my active window. The problem I'm having is that I can't get the echo to work. It keeps on trying to echo to the channel that I've left, and of course it can't find it. Please help.

Code:
on *:PART:#mychan:{ 
  if ($nick == $me) {
    unset %thisvar
    echo -a Variable unset.
  }
}


Re: Echo to active window after parting [Re: Tzar469] #209761 22/02/09 10:13 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
you want a code when you leave from your channel (#mychan) to unset a variable and inform you?

if yes > after leaving a channel the window closed so you can't see the unsetting variable into the channel left window only in the active or in the status window or in an other window except the channel left window.

if no > please reply again clearly to help you

Last edited by westor; 22/02/09 10:14 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Echo to active window after parting [Re: Tzar469] #209762 22/02/09 10:20 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Echoing to $lactive ought to solve that.

Re: Echo to active window after parting [Re: westor] #209763 22/02/09 10:23 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
Yeah, that's exactly what I want. I want it to echo into my active window after #mychan closes.

@Collective: That make the echo work, but my status window still displays an error: mychan No such nick/channel

Last edited by Tzar469; 22/02/09 10:26 PM.
Re: Echo to active window after parting [Re: Tzar469] #209765 22/02/09 10:37 PM
Joined: Dec 2008
Posts: 1,512
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,512
ok then if you want to work in your active window try this code:

Code:
on *:PART:#mychan:{ 
  if ($nick == $me) {
    unset %thisvar
    .timer[var_unset] 1 0 .echo -a Variable unset.
  }
}


this will inform's you to any window that the variable unseted

Last edited by westor; 22/02/09 10:38 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Re: Echo to active window after parting [Re: Tzar469] #209766 22/02/09 10:46 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Nothing in the code you gave is going to give a "no such nick/channel" error.

Re: Echo to active window after parting [Re: Collective] #209767 22/02/09 11:12 PM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
Hmm, you are right. It's another one of my scripts causing the trouble.

Thank you both for your help!