I started working on this, but I don't have time to finish it. You might have some use for the code I have made so far. It allows the target time to be in 12- or 24-hour format. The %t.hour and %t.min variables carry the target time in 24-hour format at the end of the alias.

Code:
alias TeeTimer {
  ; $1 = target time (eg 13:00 or 1:00p or 1:00pm)
  if (!$regex(TT,$1,/^(?:(1?\d|2[0-3]):([0-5]\d)|([1-9]|1[0-2]):([0-5]\d)([ap])m?)$/iS)) return Invalid parameter: $1
  var %t.hour = $regml(TT,1), %t.min = $regml(TT,2)
  if ((p isin $regml(TT,3)) && (%t.hour isnum 1-11)) inc %t.hour 12
  elseif ((a isin $regml(TT,3)) && (%t.hour == 12)) inc %t.hour 12
  %t.hour = $calc(%t.hour % 24)

  echo -a Target Time: %t.hour H, %t.min M, 00 S
;*** Continue code here ***
}


-genius_at_work

Last edited by genius_at_work; 11/06/06 05:47 PM.