home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 12 / MA_Cover_12.iso / libs / rxwiz / examples / cl.rexx next >
Encoding:
OS/2 REXX Batch file  |  1999-05-24  |  995 b   |  46 lines

  1. /*just a simple clock window*/
  2.  
  3. parse arg screen
  4.  
  5. wiz.Snapshot=1
  6. res=OpenSurface("clock.wizard","WIZ")
  7. if res~=0 then call error(res)
  8.  
  9. win.FallBack=1
  10. win.Gads=22
  11. win.ID=1
  12. win.nowindow=1
  13. res=OpenWindow("WIZ","WIN")
  14. if res~=0 then call error(res)
  15.  
  16. drop win.
  17. win.Activate=1
  18. win.SizeGadget=1
  19. res=OpenWindow("WIZ","WIN")
  20. if res~=0 then call error(res)
  21. ws=WindowSignal("WIZ","WIN")
  22.  
  23. ts=0
  24. mask=or(ts,ws)
  25.  
  26. rec=0
  27. do forever
  28.     if and(rec,ws)~=0 then exit
  29.     set.text="Date()"
  30.     res=SetWizAttrs("WIZ","WIN","CLOCK","SET")
  31.     if res~=0 then call error(res)
  32.     rec=Wait(mask)
  33. end
  34. exit
  35.  
  36. /**************************************************************************/
  37. error:
  38. parse arg code
  39.     call PrintFault(IoErr(),ProgramName())
  40.     string=GetRxWizString(code)
  41.     if string=="" then string="(codice sconosciuto: " || code || ")"
  42.     if RXWIZERR~="RXWIZERR" then string = string  "(field:" RXWIZERR || ")"
  43.     say string "(" || "linea" SIGL-1 ||")"
  44.     exit
  45. /**************************************************************************/
  46.