home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Anwendungen / Kurztests / IR-Master / ARexx / Send_at.rexx < prev    next >
OS/2 REXX Batch file  |  1994-09-16  |  2KB  |  58 lines

  1. /***********************
  2.     Send_At.rexx
  3.     $VER: 1.0 by Michael Watzl
  4.  
  5.     ENGLISH:
  6.     --------
  7.  
  8.     Send_at.rexx <time> <commandstring>
  9.  
  10.     This script waits untill <time> and IR_SENDs commandstring to
  11.     protname (which can be edited some lines down).
  12.  
  13.     Example: Switch off tv set at 3:00
  14.  
  15.     1> rx send_at "3:00" "IR_SEND '$POWER'"
  16.  
  17.     Assuming that the tvset.irm is running and the gadget 'POWER'
  18.     exists and is learned
  19.  
  20.     DEUTSCH:
  21.     --------
  22.  
  23.     Send_at.rexx <zeit> <kommando>
  24.  
  25.     Dieses Script wartet bis um <zeit> Uhr und IR_SENDet dann
  26.     <kommando> zu dem ARexxport, der am anfang des Scripts steht
  27.     und dort entsprechend geändert werden muß.
  28.  
  29.     Beispiel:  Der Fernseher soll um 3:00 abgeschalten werden.
  30.  
  31.     1> rx send_at "3:00" "IR_SEND '$POWER'"
  32.  
  33.     Wenn tvset.irm läuft und das Gadget "POWER" existiert und
  34.     eingelernt ist...
  35. **************************/
  36.  
  37. address  "tvset_rexx" /* Hier muß der korrekte Namen des Projektes
  38.                          angegeben werden, Groß- und Kleinschreibung!*/
  39.                       /* Here you must edit the address: Type the
  40.                          correct (case sensitive) port name */
  41.  
  42.  
  43. arg time commandstring
  44.  
  45. /* führende Leerzeichen entfernen */
  46. commandstring = strip( commandstring , "L" )
  47.  
  48. /* mit dem Shellkommando Wait wird bis zur entsprechenden Uhrzeit gewartet */
  49. say "Warte bis um "time " Uhr"
  50. address command "wait until "time
  51.  
  52.  
  53. /* Bei Leerzeichen im Commandostring werden zusätzliche Anführungszeichen
  54.    benötigt! */
  55. "IR_SEND $"commandstring
  56.  
  57. exit
  58.