mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 38
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 38
how would i get the closing of an multi-serv status window trigger an event??

ive tried
Code:
 on *:close:*:{ if ($target == "status window") { .timer -m 1 1 msg -a blaa } } 
but that doesnt help, and i tried:
Code:
 on *:disconnect:{ .timer -m 1 1 load.switchbar } 
but it doesnt give me the satisfaction that i want

Anyone got any idea??

oh yeah, help with triggering an event when closing a dcc window too would be apreciated, i think.. dont have ne1 to test my stuff on right now so.. smirk

thx for ur time

Last edited by toe_cutter; 21/01/03 07:54 PM.
Joined: Jan 2003
Posts: 12
F
Pikka bird
Offline
Pikka bird
F
Joined: Jan 2003
Posts: 12
tried ur code and does not work. think; closing status window cancels all timers and most of other commands about that status.

and cant echo any msg to other status becouse echo command cancelled too. then used /titlebar and its ok.
Code:
on *:CLOSE:*:{ 
  if ( $target == Status Window ) //titlebar $target closed
  else halt
}

but dont want to change titlebar. want to echo msg to other status. used that
Code:
on *:close:*:{
  if ( $target == status window ) set %try1234 status
}
on *:ACTIVE:*:{
  if ( %try1234 == status ) echo -a Status Window closed | set %try1234 nostatus
}

for dcc closing: /help on close

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
If I'm right (most of the time!!!!), there isn't any way to capture the closing of a status window. It has been mentioned many times... try the search for more advice


Aubs.
cool

Joined: Jan 2003
Posts: 38
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 38
Thx! Saved me half my life with that smile

the on close for dcc is mostly for fserve, i dont think it worked with regular dcc's, long time i tried it though. but since you did my status thingie im going to work on the dcc!

Thx again!

Joined: Dec 2002
Posts: 27
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 27
Quote:
closing status window cancels all timers and most of other commands about that status.

use offline timer then.

from mirc help file :
If you are connected to a server and you start a timer, it defaults to being an online timer, which means that if you disconnect from the server, it will be turned off. You can specify the -o switch to force it to be an offline timer.


Joined: Jan 2003
Posts: 12
F
Pikka bird
Offline
Pikka bird
F
Joined: Jan 2003
Posts: 12
offline timers continue to work after disconnect. but closing status window cancels it too, as other commands which works in the status window (or channel, querry, notice and custom windows which belongs that status).

but we can use some commands with "closing status window" event: /titlebar, /dialog, /set and other general mirc commands. we cant (i tried and cant) echo msg or activate another command on another window.

i solved this problem by using "/set variables" command. (i tried "/var" first. but closing s.window couses script to forget its value). so i put a note that status window closed, and when active window changes, script sees that note and can activate all other commands (as i wrote my past post).

there can be a short way to do this but i dont know. someone knows?

Joined: Jan 2003
Posts: 38
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 38
Quote:
there can be a short way to do this but i dont know. someone knows?
Beats me.. and i was the one that asked in first place smile
But on to another thing, i used the code below to get a trigger when a dcc send started, but id like to know if there was any other way to do it??

Code:
 ctcp *:dcc send *:?:{ .timer -m 1 1 load.switchbar | set %waiting $true | .timer 0 1 accepted }
alias accepted {
  if (!%waiting) { halt }
  if ($get($get(0)).rcvd > 1) {
    .timer -m 1 1 load.switchbar
    unset %waiting
  }
} 


Any ideas?

Maybe i should start a new thread, but i dont know how ppl feel about spamming the forum here smirk

Last edited by toe_cutter; 24/01/03 12:09 PM.
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
In this post, I explain how to tell if you are starting a DCC SEND, as well as be able to detect/script a DCC RESUME notification.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Use the -i switch. smile

From mirc.hlp: The -i switch makes a timer dynamically associate with whatever happens to be the active connection. If a server window is closed, the timer is associated with the next available server window.
Code:
on *:close:*:if ($target == Status Window) .timer -i 1 0 echo -a Closed connection: $cid


Link Copied to Clipboard