home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / vrexx_2.zip / VREXX2.DOC < prev   
Text File  |  1994-01-19  |  2KB  |  67 lines

  1. VREXX
  2.  
  3. VREXX is Visual REXX for OS/2 Presentation Manager!  VREXX allows you to
  4. write standard OS/2 REXX command files which can create and control PM windows.
  5. VREXX also dynamically constructs dialog boxes which allow filename selection,
  6. font and color selection, string input, and message display.  Other functions
  7. allow selection of items through listbox, radiobutton and checkbox dialogs.
  8.  
  9. VREXX also supports graphical text output in 14 different fonts, as well as
  10. pixel, marker, polyline, polygon, spline and arc drawing functions.
  11.  
  12. You DO NOT need to be a PM programmer to use VREXX!  Here is a complete
  13. VREXX hello world program, with an additional message box at the end:
  14.  
  15. -------------------------------------------------------------------------------
  16. /* HELLO.CMD */
  17.  
  18. /* initialize VREXX external functions */
  19.  
  20. '@echo off'
  21. call RXFUNCADD 'VInit', 'VREXX', 'VINIT'
  22. initcode = VInit()
  23. if initcode = 'ERROR' then signal CLEANUP
  24.  
  25. signal on failure name CLEANUP
  26. signal on halt name CLEANUP
  27. signal on syntax name CLEANUP
  28.  
  29. /* do hello, world window */
  30.  
  31. position.left   = 25    /* put window in the center of the screen */
  32. position.bottom = 25    /* coordinates are % of screen */
  33. position.right  = 75
  34. position.top    = 75
  35.  
  36. /* open the window and draw the text string */
  37.  
  38. id = VOpenWindow('My VREXX Window', 'WHITE', position)
  39. call VSay id, 300, 500, 'Hello, world'
  40.  
  41. /* put up a 1 line message box - when user presses ok, end the program */
  42.  
  43. msg.0 = 1
  44. msg.1 = 'Press OK to end the HELLO.CMD program'
  45. call VMsgBox 'HELLO.CMD', msg, 1
  46.  
  47. call VCloseWindow id
  48.  
  49. CLEANUP:
  50.    call VExit     /* terminate VREXX */
  51. exit
  52. -------------------------------------------------------------------------------
  53.  
  54. Run the procedure just like any other REXX procedure, by typing
  55.  
  56. hello
  57.  
  58. or
  59.  
  60. start hello.cmd
  61.  
  62. at an OS/2 command prompt.  On-line help is available by typing:
  63.  
  64. view vrexx.inf
  65.  
  66. VREXX was written by Richard B. Lam at the IBM T.J. Watson Research Center.
  67.