home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / mag&info / etc130.zip / ETC_DEMO.ETC < prev    next >
Text File  |  1993-03-08  |  6KB  |  151 lines

  1. $T = "EtCetera Demo"
  2. $D = GetDirectory
  3. Match "SAMPLE.BMP", $A
  4. If $A = "SAMPLE.BMP" Then Goto HaveBMP
  5. Message "This demo program requires the use of the file SAMPLE.BMP, located on your installation disk.  Copy it into the directory where EtCetera is located and then restart.", $T
  6. End
  7. :HaveBMP
  8. CD WinDirectory
  9. Match "WRITE.EXE", $A
  10. If $A = "WRITE.EXE" Then Goto FoundWrite
  11. :S/gMissing
  12. Message "This demo program requires the use of three programs included with Windows.  EtCetera could not find them in your Windows directory: Write (WRITE.EXE), Notepad (NOTEPAD.EXE), and Calculator (CALC.EXE).  Click OK to abort this demo.", $T
  13. End
  14. :FoundWrite
  15. Match "NOTEPAD.EXE", $A
  16. If $A <> "NOTEPAD.EXE" Goto S/gMissing
  17. Match "CALC.EXE", $A
  18. If $A <> "CALC.EXE" Then Goto S/gMissing
  19. Message "Click OK to begin the EtCetera Demo.", $T
  20. TitleFill 100
  21. #A = Lines + 99
  22. For #B = 100 to #A
  23. Hide $[#B]
  24. Next
  25. Run "NOTEPAD.EXE", Maximized
  26. Send "Welcome to a demonstration of the capabilities of EtCetera.{Enter}{Enter}"
  27. Wait 2 seconds
  28. Send "This batch language interpreter for the Microsoft Windows environment{Enter}"
  29. Send "is designed to allow users and systems administrators automate mundane or{Enter}"
  30. Send "routine tasks.  EtCetera can take control of any Windows application and{Enter}"
  31. Send "perform tasks just as you would at the keyboard.  I can type text into an{Enter}"
  32. Send "application, as you see me doing here...{Enter}{Enter}"
  33. Wait 3 seconds
  34. Send "I can even pull items off of the menu bar."
  35. Wait 2 seconds
  36. Send "/af"
  37. Wait 2 seconds
  38. Send "s"
  39. Wait 2 seconds
  40. $A = TEMPFILENAME
  41. Send $A & "{Enter}"
  42. Wait 3 seconds
  43. Send "/c{Home}/c/s{End}{Del}"
  44. Send "This is a particularly useful ability for automating any task you have.  For{Enter}"
  45. Send "instance, if you have files which you download nightly via modem, you can{Enter}"
  46. Send "program EtCetera to do it for you, and go on to do other things, like{Enter}"
  47. Send "go home.{Enter}{Enter}"
  48. Wait 3 seconds
  49. Send "Perhaps, however, you are a systems administrator who needs an easy{Enter}"
  50. Send "way to get into applications and set things up for your users.  EtCetera{Enter}"
  51. Send "makes this easy.  I can get as flashy as you need.  Watch this...{Enter}{Enter}"
  52. Wait 3 seconds
  53. Send "/a c"
  54. Wait 1 second
  55. Send "{Tab}{Enter}"
  56. Run "CALC.EXE"
  57. Wait 1 second
  58. Center
  59. Wait 1 second
  60. Left
  61. Wait 1 second
  62. Right
  63. Wait 1 second
  64. Center
  65. Wait 1 second
  66. Top
  67. Wait 1 second
  68. Bottom
  69. Wait 1 second
  70. Center
  71. Wait 1 second
  72. Flash "Calc" 3 times
  73. Beep 3 times
  74. Close "Calc"
  75. Message "I have a number of options available to" & ANSI(13) & "attract the attention of users." & ANSI(13) & "Click OK to continue...", $T
  76. Message "If you have a sound card either with Windows 3.10 or with Windows 3.00 plus the Multimedia Extensions, I can play sound files.", $T
  77. Ask $A, "Does your system meet either of these requirements?"
  78. If $A = "No" Then Goto NoSound
  79. CreateWindow @A, 120, 50, 400, 50
  80. WriteText @A "If you see an error message, just click ""Yes""", 10, 10
  81. Match "*.WAV", $W
  82. PlaySound $W
  83. Match "*.WAV", $W
  84. PlaySound $W
  85. Match "*.WAV", $W
  86. PlaySound $W
  87. DestroyWindow @A
  88. :NoSound
  89. Run "WRITE.EXE", Maximized
  90. Send "I can hide all applications currently running except the one the "
  91. Send "user is supposed to see, and once the user shuts that application down, I "
  92. Send "can resume your program.  You may have noticed that I hid everything which "
  93. Send "was running when I first started.  Go ahead and play with Write, and then, when you "
  94. Send "want to continue, close Write by selecting the Exit command from the File "
  95. Send "menu.  Then I will resume.{Enter}{Enter}"
  96. Wait Until "Write" Closes
  97. Message "Ta Da!", $T
  98. Execute "WRITE.EXE", Maximized
  99. Send "In this way, you can keep control of what your users do, direct what "
  100. Send "goes on, and prevent unnecessary access to your systems - especially helpful in "
  101. Send "open environments, or unattended systems.  Of course, an experienced user who "
  102. Send "intends to create difficulties is not likely to be stopped by this feature, but it will "
  103. Send "definitely help prevent accidents which newer users can create.{Enter}{Enter}"
  104. Wait 5 seconds
  105. Send "/c{Home}/s/c{End}{Del}"
  106. Send "I can also pass text data back and forth between applications via Windows' Clipboard.{Enter}{Enter}"
  107. Wait 3 seconds
  108. Input $[200], "Please type your name and press the Enter key:", "EtCetera Demo"
  109. Send "I will now place your name into Windows' Clipboard and paste it right here: "
  110. Wait 2 seconds
  111. SetClipboard 200, 200
  112. Send "/ae"
  113. Wait 2 seconds
  114. Send "p"
  115. Wait 2 seconds
  116. Send "{Enter}"
  117. Send "And, as I can also cut or copy data from any text-based application, I can manipulate data "
  118. Send "and place it back into your applications - making it easy to implement "
  119. Send "office automation.  The nice thing about this is that I can give any Windows application "
  120. Send "a macro language without the need to invest in major applications.  The power of the "
  121. Send "applications included with Windows - Terminal, Write, Notepad, and CardFile - increase "
  122. Send "a hundredfold when given the functionality of a macro language.{Enter}{Enter}"
  123. Wait 5 seconds
  124. Close "Write"
  125. Wait 2 seconds
  126. Send "{Tab}{Enter}"
  127. Wait 1 second
  128. CreateWindow @A, 10, 10, 300, 300
  129. WriteText @A, "I can also create windows", 10, 10
  130. WriteText @A, "and write text to them.", 10, 24
  131. Wait 3 seconds
  132. PaintWindow @A, RED
  133. Wait 1 second
  134. PaintWindow @A, YELLOW
  135. Wait 1 second
  136. PaintWindow @A, GREEN
  137. Wait 1 second
  138. PaintWindow @A, BLUE
  139. Wait 1 second
  140. PaintWindow @A, WHITE
  141. WriteText @A, "I can also display bitmap files:", 10, 10
  142. DisplayBitmap @A, $D & "\SAMPLE.BMP", 10, 30
  143. Wait 3 seconds
  144. DestroyWindow @A
  145. Message "This has been a small sampling of what I can do.  Refer to your documentation for a complete list of my commands.", $T
  146. Message "This file, ETC_DEMO.ETC, can be used as an example of how to program EtCetera.", $T
  147. Message "⌐ 1992 Thetaware" & Ansi(13) & "All Rights Reserved.", $T 
  148. For #B = 100 to #A
  149. UnHide $[#B]
  150. Next
  151.