home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 216.lha / RexxArpLib_v2.1 / rexx / DoReminders.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1996-02-15  |  1.8 KB  |  55 lines

  1. /* this executes all reminder files at logon */
  2.  
  3. 'date | execio stem today.'
  4. parse var today.1 day todaydate remtime .
  5. parse var remtime remhrs':'remmin':'remsec
  6. 'list hd:reminders/'todaydate'* | execio stem files.'
  7. do i = 2 to files.0-1
  8.    parse var files.i file .
  9.    newfile = 'hd:reminders/'file
  10.    execio read  newfile stem lines.
  11.    nag = ""
  12.    do j = 1 to lines.0
  13.      interpret lines.j
  14.    end
  15.    parse var time hrs':'min':'sec
  16.    if sec = "" then sec = "00"
  17.    if hrs > remhrs  then "runwsh remind "todaydate time nag message 
  18.    if hrs = remhrs & min > remmin then "runwsh remind "todaydate time nag message 
  19.    if hrs = remhrs & min = remmin & sec > remsec then "runwsh remind "todaydate time nag message 
  20. end
  21.  
  22. 'list hd:reminders/everyday* | execio stem files.'
  23.  
  24. do i = 2 to files.0-1
  25.    parse var files.i file .
  26.    newfile = 'hd:reminders/'file
  27.    execio read  newfile stem lines.
  28.    nag = ""
  29.    do j = 1 to lines.0
  30.      interpret lines.j
  31.    end
  32.    parse var time hrs':'min':'sec
  33.    if sec = "" then sec = "00"
  34.    if hrs > remhrs  then "runwsh remind "todaydate time nag message 
  35.    if hrs = remhrs & min > remmin then "runwsh remind "todaydate time nag message 
  36.    if hrs = remhrs & min = remmin & sec > remsec then "runwsh remind "todaydate time nag message 
  37. end
  38.  
  39.  'list hd:reminders/'day'* | execio stem files.'
  40.  
  41.  do i = 2 to files.0-1
  42.     parse var files.i file .
  43.     newfile = 'hd:reminders/'file
  44.     execio read  newfile stem lines.
  45.     nag = ""
  46.     do j = 1 to lines.0
  47.      interpret lines.j
  48.     end
  49.     parse var time hrs':'min':'sec
  50.     if sec = "" then sec = "00"
  51.     if hrs > remhrs  then "runwsh remind "todaydate time nag message 
  52.     if hrs = remhrs & min > remmin then "runwsh remind "todaydate time nag message 
  53.     if hrs = remhrs & min = remmin & sec > remsec then "runwsh remind "todaydate time nag message 
  54.  end
  55.