home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / FREDV19A.LHA / FrexxEd / fpl / KillNotify.FPL < prev    next >
Encoding:
Text File  |  1995-07-19  |  613 b   |  20 lines

  1. int export KilledNotify_hook(int ID)
  2. {
  3.   int countdown = ReadInfo("_iconify_when_quit_countdown", ID);
  4.   string port = ReadInfo("_notifyport", ID);
  5.   if(strlen(port)) {
  6.     ARexxSend(port, "!");
  7.   }
  8.   if (countdown > 0 && ReadInfo("_iconify_when_quit",ID)) {
  9.     SetInfo(ID, "_iconify_when_quit_countdown", countdown-1);
  10.     if (countdown == 1) {
  11.       Iconify();
  12.     }
  13.   }
  14. }
  15.  
  16. ConstructInfo("_notifyport", "", "", "HLS", "", 0, 0);
  17. ConstructInfo("_iconify_when_quit", "", "", "HLB", "", 0, 0);
  18. ConstructInfo("_iconify_when_quit_countdown", "", "", "HGI", "", 0, 9999, 0);
  19. Hook("BufferKill", "KilledNotify_hook");
  20.