mIRC Homepage
Posted By: foshizzle why doesnt this work - 28/02/08 02:14 AM
Code:
on ^*:CLOSE:@Warp: { window -u @Warp | if ($input(Are you sure you want to quit?,wydv,Quit?) == $no) {
    window -o @Warp | halt
  }
  else { 
    if ($hget(Warp)) { hfree Warp }
    unset %w* | unset %t* | unset %star* | unset %m* | unset %ticks 
  }
}

im not very good with the ^ prefix, so why doesnt this work?
Posted By: Miguel_A Re: why doesnt this work - 28/02/08 03:01 AM
Hi

The even´t on close will trigger when the windows is already closing.
The action off closing can´t be stoped.
Now you can always open i again when closing it.

Note: I don´t know if is ther any other command that can prevent a window to close.
Posted By: foshizzle Re: why doesnt this work - 28/02/08 03:21 AM
i tried opening up the window again, but it didnt
Posted By: Miguel_A Re: why doesnt this work - 28/02/08 03:23 AM
query $target for a private
join $target for a channel

by
Posted By: foshizzle Re: why doesnt this work - 28/02/08 03:42 AM
if u noticed... im using a custom window
Posted By: Bekar Re: why doesnt this work - 28/02/08 04:11 AM
How are you closing the window?

ON CLOSE doesn't get launched if you /close it (I think it's /window -c @window).
Posted By: foshizzle Re: why doesnt this work - 28/02/08 05:09 AM
i know
Posted By: Bekar Re: why doesnt this work - 28/02/08 08:37 AM
.. so how are you closing the window ?
Posted By: Mpdreamz Re: why doesnt this work - 28/02/08 12:08 PM
Officially on ^*:Close is not even suppose to trigger before closing:
Quote:

The ^ event prefix currently works only on the following types of events: ACTION, BAN, CHAT, DEHELP, DEOP, DEVOICE, HELP, INVITE, JOIN, KICK, MODE, NICK, NOTICE, OP, OPEN, PART, PING, TEXT, UNBAN, USERMODE, VOICE, QUIT, SERV, SERVERMODE, SERVEROP, SNOTICE, TABCOMP, TOPIC, WALLOPS.


The fact it does is a bug. You could request this as a feature request.
Posted By: LonDart Re: why doesnt this work - 04/03/08 09:06 AM
I have used this code and it works fine.
Code:
on ^*:CLOSE:@:$iif($target == @mywindow, myalias)
I suspect that custom windows are the exception to the ^ prefix not working with the CLOSE event.

However, while I don't have a v6.31 installed, I couldn't find anything in
versions.txt that would indicate that we can now use $input inside an event.

Try aliasing out the bulk of the event and just calling the alias from the event.
Posted By: LonDart Re: why doesnt this work - 04/03/08 06:24 PM
Oh, nevermind. Miguel_A is right; you can't stop the window from closing.
The alias i was using merely ensured that the @window contents were saved.

I should test before I post, eh? blush
© mIRC Discussion Forums