home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / comm / qamitrack / arexx / detectlogon.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-02-19  |  1.5 KB  |  50 lines

  1. /* 
  2.  
  3.    An Arexx script to detect when somebody is online.  To
  4.    use this script, run QAmiTrack like this:
  5.    
  6.     QAmiTrack LOGONSCRIPT=detectlogon.rexx
  7.    
  8. */
  9.  
  10. /* Set these to be the data of who you want to detect */
  11. /* Note that capital/lower case differences count!!!  */
  12. /* You will get notified if someone comes on line     */
  13. /* who matches in at least one of the three data      */
  14. /* types:  RealName, HostName, or UserName.           */
  15.  
  16. DetectRealName.0 = "Jeremy Friesner"
  17. DetectHostName.0 = "chewils031.ucsd.edu"
  18. DetectUserName.0 = "jaf"
  19.  
  20. DetectRealName.1 = "KnightOwl"
  21. DetectHostName.1 = "something.somewhere.idontknow"
  22. DetectUserName.1 = "pgba0078"
  23.  
  24. /* You can add other people to the list by copying the
  25.    lines above, changing the index number on each line
  26.    to the next number, then setting numUsers to be one
  27.    more than the last index. */
  28.  
  29. numUsers = 2
  30.  
  31. /* get arguments passed from QAmiTrack */
  32. parse arg arg1 "^" arg2 "^" arg3 "^" arg4 "^" arg5 "^" arg6
  33.  
  34. /* Look though our registered users to find if one matches */
  35. do i=0 by 1 for numUsers
  36.   detected = 0
  37.  
  38.   if (arg2 = DetectHostName.i) then detected = 1
  39.   if (arg3 = DetectUserName.i) then detected = 1
  40.   if (arg4 = DetectRealName.i) then detected = 1
  41.  
  42.   if (detected = 1) then do
  43.     /* Uses the speech synthesizer here, but you could of
  44.        course change this to put up a requester or play
  45.        an sound effect or whatever */
  46.     address COMMAND 'sys:utilities/say ' arg4 ' is now online!'
  47.     end
  48. end
  49.  
  50.