home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / sysadmin / 5038 < prev    next >
Encoding:
Text File  |  1992-09-07  |  2.1 KB  |  62 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!spool.mu.edu!mixcom.com!parsec!alberto
  3. From: alberto@parsec.mixcom.com (Manuel Alberto Ricart)
  4. Subject: Re: NeXT Remote Power Up/Down?
  5. Message-ID: <1992Sep6.030034.1793@parsec.mixcom.com>
  6. Sender: alberto@parsec.mixcom.com (Manuel Alberto Ricart)
  7. Reply-To: alberto@parsec.uucp
  8. Organization: I keep everything where I <most likely> can find it.
  9. References: <Btywsz.953@suite.com>
  10. Date: Sun, 6 Sep 1992 03:00:34 GMT
  11. Lines: 49
  12.  
  13. In article <Btywsz.953@suite.com> Mark-Tarbell@suite.com writes:
  14. > In article <BtxEHp.JIA@ux1.cso.uiuc.edu> lemson@ux1.cso.uiuc.edu (David  
  15. > Lemson) writes:
  16. > > eps@futon.SFSU.EDU (Eric P. Scott) writes:
  17. > > 
  18. > > >You know the "Printing" panel that pops up when your NeXT Laser
  19. > > >Printer runs out of paper?  That's done by a handy little program
  20. > > >called /usr/lib/NextPrinter/Inform.  It turns out that Inform can
  21. > > >display any message of your choosing:
  22. > > 
  23. > > >a general-purpose notification service.  (Hmm... you can probably
  24. > > >replace the "PrinterAlert" nib section with whatever you want.)
  25. > > 
  26. > > You sure can, I just did it in about 25 seconds... makes a great app
  27. > > to pop up on all the machines in the lab when there is going to be a
  28. > > system shutdown!
  29. > Note that you can't do this under 3.0. Enjoy it while you can.
  30.  
  31. But you could hack your own. After all this "seems" to be a fairly
  32. easy thing to do, 10 sec. code:
  33.  
  34. /*
  35.  *     Generated by the NeXT Interface Builder. Rename the binary with the 
  36.  *     .daemon extension (to avoid a miniwindow from being created).
  37.  */
  38.  
  39. #import <stdlib.h>
  40. #import <appkit/Application.h>
  41.  
  42. void main(int argc, char *argv[]) {
  43.  
  44.     // Do a run through the argument vector and switch it
  45.     // (the most time cosuming thing in this program.
  46.     // Don't forget to exit if argc == 0.
  47.     
  48.     NXApp = [Application new];
  49.     
  50.     // Substitute the above messages by the strings gotten from the
  51.     // Argument vector.
  52.  
  53.     NXRunAlertPanel(NULL, "A Panic has just occured!","Power Off",  
  54. "Halt","Reboot");
  55.     [NXApp free];
  56.     exit(0);
  57. }
  58. -- 
  59. Manuel Alberto Ricart
  60. alberto@parsec.mixcom.com <NeXTMail Welcome>
  61.