home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util1 / pwrbt14e.lzh / BOXDEMO1.PWR next >
Text File  |  1990-12-01  |  3KB  |  91 lines

  1. Variable    FColor,1
  2. Variable    BColor,1
  3. Variable    ColorAttr,1
  4. Variable    Clr1,3,30
  5. Variable    Clr2,3,46
  6. Variable    Clr3,3,62
  7. Variable    Clr4,3,78
  8. Variable    Clr5,3,94
  9. Variable    Clr6,3,110
  10. Variable    InChar,1
  11. ?Color      FColor,BColor,ColorAttr           ;save curr colors
  12. wait 80                                       ;wait 8 secs to read DOS msg
  13. Clear       Clr1                              ;clear screen to color 1
  14. Center      "And now the same task with PowerBatch",12
  15. Wait        30                                ;wait 3 secs to read msg
  16. Label       MonType
  17. GoToXY      1,20
  18. ReadYN      "Do you have a color monitor? [Y/N] ",InChar
  19. Compare     InChar,"N",ColorsOK
  20. SetVar      Clr1,7                            ;reset colors for mono
  21. SetVar      Clr2,112
  22. SetVar      Clr3,112
  23. SetVar      Clr4,112
  24. SetVar      Clr5,112
  25. SetVar      Clr6,112
  26. Label       ColorsOK
  27. Clear       Clr1                              ;clear screen
  28. Box1        15,7,66,18,Clr1                   ;draw center box, color 1
  29. WriteAt     16,8,"Drawing boxes (or frames) around screen displays"
  30. WriteAt     17,9,"seems to add a finishing touch to menus, messages"
  31. WriteAt     17,10,"or any other information conveyed to the user."
  32. WriteAt     16,12,"With a batch file, not only is it time consuming,"
  33. WriteAt     17,13,"but painfully slow. Most of the time it simply"
  34. WriteAt     17,14,"is not worth the trouble."
  35. WriteAt     16,16,"With PowerBatch, you draw your frame with one"
  36. WriteAt     17,17,"command. And it is a little faster..."
  37. Box1        2,1,14,6,Clr1                     ;draw boxes around perif
  38. Box1        2,7,14,12,Clr1
  39. Box1        2,13,14,18,Clr1
  40. Box1        2,19,14,24,Clr1
  41. Box1        15,19,27,24,Clr1
  42. Box1        28,19,40,24,Clr1
  43. Box1        41,19,53,24,Clr1
  44. Box1        54,19,66,24,Clr1
  45. Box1        67,19,79,24,Clr1
  46. Box1        67,13,79,18,Clr1
  47. Box1        67,7,79,12,Clr1
  48. Box1        67,1,79,6,Clr1
  49. Box1        54,1,66,6,Clr1
  50. Box1        41,1,53,6,Clr1
  51. Box1        28,1,40,6,Clr1
  52. Box1        15,1,27,6,Clr1
  53. wait        30                                  ;wait 3 secs
  54. ClearBox    2,1,14,6,Clr6                       ;clear boxes to different colors
  55. ClearBox    2,7,14,12,Clr2
  56. ClearBox    2,13,14,18,Clr3
  57. ClearBox    2,19,14,24,Clr4
  58. ClearBox    15,19,27,24,Clr5
  59. ClearBox    28,19,40,24,Clr6
  60. ClearBox    41,19,53,24,Clr2
  61. ClearBox    54,19,66,24,Clr3
  62. ClearBox    67,19,79,24,Clr4
  63. ClearBox    67,13,79,18,Clr5
  64. ClearBox    67,7,79,12,Clr6
  65. ClearBox    67,1,79,6,Clr2
  66. ClearBox    54,1,66,6,Clr3
  67. ClearBox    41,1,53,6,Clr4
  68. ClearBox    28,1,40,6,Clr5
  69. ClearBox    15,1,27,6,Clr6
  70. Wait        30
  71. ClearBox    28,19,40,24,Clr1
  72. ClearBox    28,1,40,6,Clr1
  73. ClearBox    2,19,14,24,Clr1
  74. ClearBox    54,1,66,6,Clr1
  75. ClearBox    67,1,79,6,Clr1
  76. ClearBox    67,7,79,12,Clr1
  77. ClearBox    67,13,79,18,Clr1
  78. ClearBox    67,19,79,24,Clr1
  79. ClearBox    54,19,66,24,Clr1
  80. ClearBox    15,19,27,24,Clr1
  81. ClearBox    15,1,27,6,Clr1
  82. ClearBox    2,13,14,18,Clr1
  83. ClearBox    2,7,14,12,Clr1
  84. ClearBox    41,1,53,6,Clr1
  85. ClearBox    41,19,53,24,Clr1
  86. ClearBox    2,1,14,6,Clr1                       ;clear boxes to different colors
  87. WriteAt     1,25,"Press any key to exit"
  88. GoToXY      23,25                               ;position cursor after msg
  89. ReadKey     InChar                              ;wait for user to press key
  90. Clear       ColorAttr                           ;clear screen to orig color
  91.