Originally Posted By: Om3n
Not sure how mirc handles a scripted /exit alias, but maybe that specifically could be halted to prevent it from triggering the exit.


Like all mIRC's commands, /exit can be changed as well, preventing the actual exit if desired.

Code:
alias exit {
  if ($input(Are you sure you want to exit?, yvq, Exit mIRC) == $yes) exit
}


I have also wanted a "pre-exit event" that is called at the very start of the exit process (that stops on haltdef) without having to realias exit (because what if some other script also realiases exit?).

Edit: This code only works if trying to prevent /exit from taking place.

Code:
alias exit {
  exit
  ; Once called, /exit doesn't return
  ; This point is never reached
}


Edit2: $com sleep seems the best option for delaying an actual exit, as long as it doesn't freeze the GUI.

Originally Posted By: genius_at_work
If a program/script prevented me from exiting the program, I'd terminate it immediately and uninstall the program/script.


I think it's more for checking error messages that appear on the exit event... wink

Last edited by NaquadaServ; 22/06/07 06:51 PM.

NaquadaBomb
www.mirc-dll.com