home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / TE2_134T / te2inst.003 / Button2.scr < prev    next >
Text File  |  1997-07-03  |  3KB  |  70 lines

  1. /* ---------------------------------------------------------------------- */
  2. /* Button1.Scr -- TE/2 REXX Syntax Script                                 */
  3. /*                Copyright 1994, Oberon Software                         */
  4. /*                All rights reserved                                     */
  5. /*                                                                        */
  6. /* Sample script to document the use of TE2PWin                           */
  7. /*                                                                        */
  8. /* ---------------------------------------------------------------------- */
  9.  
  10. Txt.0  = 40
  11. Txt.1  = 'There are three main sections in the TE2PWin profile file that'
  12. Txt.2  = 'you can customize.  You can set the TE2PWin Window Title, you'
  13. Txt.3  = 'can name the OS/2 pipe that TE2PWin will use to communicate with'
  14. Txt.4  = 'TE/2, and you can set the TE2PWin button definitions.'
  15. Txt.5  = ''
  16. Txt.6  = 'The TITLE and PIPE keywords are straightforward, you simply place'
  17. Txt.7  = 'the value you want on the line after the keyword.'
  18. Txt.8  = ''
  19. Txt.9  = 'Keywords B1 through B6 define the buttons and the syntax is slightly'
  20. Txt.10 = 'more complex.  Each of these lines should look something like:'
  21. Txt.11 = ''
  22. Txt.12 = '  Bx [""ButtonText""] ScriptCommand'
  23. Txt.13 = ''
  24. Txt.14 = 'The square brackets around ""ButtonText"" indicate that this is'
  25. Txt.15 = 'optional, do NOT include the square brackets but DO include the'
  26. Txt.16 = 'double quote marks as this is the clue to TE2PWin that there is'
  27. Txt.17 = 'a button text definition.  If you omit the button test, TE2PWin'
  28. Txt.18 = 'places the button number on the button.'
  29. Txt.19 = ''
  30. Txt.20 = 'Press any key for more.'
  31. Txt.21 = 'The ScriptCommand portion of the button definition is everything'
  32. Txt.22 = 'that appears on the line after the Button Text if it exists or'
  33. Txt.23 = 'after the keyword if not.  This can be anything that you could'
  34. Txt.24 = 'otherwise use in a TE/2 script.  Normally, you will probably want'
  35. Txt.25 = 'to write a script for each button and place a RUN() command for'
  36. Txt.26 = 'it in the profile file.'
  37. Txt.27 = ''
  38. Txt.28 = 'For simpler commands, you can just use the command directly in'
  39. Txt.29 = 'the button definition.  When you do this, it may be handy to use'
  40. Txt.30 = 'the ""&"" character to chain two or more commands.  If you chain'
  41. Txt.31 = 'the command WindowMinMax(2) at the beginning of a chain it will'
  42. Txt.32 = 'ensure that TE/2 has the OS/2 input focus for the remainder of'
  43. Txt.33 = 'the commands.'
  44. Txt.34 = ''
  45. Txt.35 = 'An couple examples of this would be:'
  46. Txt.36 = ''
  47. Txt.37 = '  B3 ""~GEnie"" WindowMinMax(2) & Dial(""GEnie"")'
  48. Txt.38 = '  B4 ""E~xit""  WindowMinMax(2) & Exit(TRUE)'
  49. Txt.39 = ''
  50. Txt.40 = 'Press any key to clear this display and return control to TE/2.'
  51.  
  52. 'WindowMinMax(2)'
  53. 'sprintf("[%ld", OpenDialog(0, 2, 23, 76, DLogNormAttr))'
  54. h = substr(rc, 2)
  55. do i = 1 to 20
  56.   'StrPut('i+1', 6, DLogNormAttr, "%s", "'Txt.i'")'
  57. end
  58. 'getc()'
  59. 'CloseDialog('h')'
  60.  
  61. 'sprintf("[%ld", OpenDialog(0, 2, 23, 76, DLogNormAttr))'
  62. h = substr(rc, 2)
  63. do i = 21 to 40
  64.   'StrPut('i+1-20', 6, DLogNormAttr, "%s", "'Txt.i'")'
  65. end
  66. 'getc()'
  67. 'CloseDialog('h')'
  68.  
  69. exit 0
  70.