home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / educatio / tw31.zip / TWTUT8.CHP < prev    next >
Text File  |  1993-05-25  |  11KB  |  470 lines

  1. %
  2. #EF
  3. #TMULTI - MEDIA
  4. #C2,R7
  5. In this final Chapter we'll cover the ~HCommands~N which make ~H~bTutorialWriter~N
  6.  
  7. one of the most powerful ~G~IAuthoring Systems~N available today.
  8.  
  9.  
  10.  
  11. These ~HCommands~N allow you to add ~C~IMusic~N, ~C~IVoice~N, ~C~Iimported Textscreens~N, ~C~IANSI~N
  12.  
  13. screens, ~C~IGraphics~N and other ~C~Iexecutable programs~N to your ~M~Itutorials~N.
  14.  
  15.  
  16.  
  17. Let's start with the ~C~IMusic~N and ~C~IVoice Utilities~N on the ~G~IAuthor Utilities~N
  18.  
  19. ~HMenu~N.
  20. #W
  21. #EF
  22. #T
  23. #GT,utilities
  24. #D3
  25. #BO,2,19,36,24,7,1,0,4,14,1
  26. When you select Music Files and
  27. choose Create a Music File, you
  28. will be presented with the
  29. following Entry Screen.
  30.  
  31. #GT,musicmaker
  32.  
  33. #D5
  34. #BO,2,20,34,24,7,1,0,3,14,1
  35. Pressing F1 brings up a Help
  36. Menu, which is specific to
  37. the Entry Field you are on.
  38.  
  39. #GT,music help
  40.  
  41. #D5
  42. #BO,2,21,34,24,7,1,0,2,14,1
  43. Here's an example of a Help
  44. Screen in the Music Utility.
  45.  
  46. #GT,music notes
  47.  
  48. #D20
  49.  
  50. #GT,musicmaker
  51.  
  52. #D5
  53. #BO,2,19,36,24,7,1,0,4,14,1
  54. Now add your Musical Notation
  55. according to the Help Screen
  56. Instructions and press F10
  57. to bring up another Menu.
  58.  
  59. #GT,music menu
  60.  
  61. #D5
  62.  
  63. #BO,2,19,38,24,7,1,0,4,14,1
  64. Select Save and TutorialWriter
  65. will automatically add the .MUS
  66. extension to the filename you
  67. chose.
  68.  
  69. #EL,25
  70. #W
  71. %
  72. #EF
  73. #TMULTI - MEDIA
  74. #C2,R6
  75. To play the ~HMusic File~N you have created within your ~M~Itutorial~N, the ~HCommand~N
  76.  
  77. is ~C~I#P~N followed by the name of your file  e.g. ~C~I#Pmusicfile~N.  You don't need
  78.  
  79. to add the ~H.MUS~N extension, because ~G~ITWTEACH~N automatically looks for a file
  80.  
  81. with that extension.
  82.  
  83.  
  84.  
  85.  
  86. Creating ~HVoice files~N is even easier than creating ~HMusic~N files.  Once again
  87.  
  88. we use the ~G~IAuthor Utilities~N and choose ~G~IVoice Files~N and ~G~ICreate~N.  This is
  89.  
  90. the screen we are presented with.
  91.  
  92. #WP
  93. #EF
  94.  
  95. #GT,create voice
  96.  
  97. #D5
  98.  
  99. #BO,2,19,36,24,7,1,0,4,14,1
  100. Scroll up and down through the
  101. available phrases then press
  102. ENTER or a Mouse Button to
  103. select one.
  104.  
  105. #GT,create voice 2
  106.  
  107. #D5
  108.  
  109. #BO,42,4,76,10,7,1,0,5,14,1
  110. This brings up another Menu and
  111. if you choose 'Add to Phrase'
  112. the chosen phrase will be
  113. joined to any you have already
  114. selected, up to four phrases.
  115.  
  116. #GT,create voice 3
  117.  
  118. #D5
  119.  
  120. #BO,42,4,76,8,7,1,0,3,14,1
  121. Then select Save to create a
  122. Voice file. It will be given
  123. the .VOI extension.
  124.  
  125. #EL,25
  126. #W
  127. %
  128. #EF
  129. #T
  130. #C2,R6
  131. To play the ~HVoice File~N you have created within your ~M~Itutorial~N, the ~HCommand~N
  132.  
  133. is ~C~I#V~N followed by the name of your file  e.g. ~C~I#Vvoicefile~N.  You don't need
  134.  
  135. to add the ~H.VOI~N extension, because ~G~ITWTEACH~N automatically looks for a file
  136.  
  137. with that extension.
  138.  
  139.  
  140.  
  141.  
  142. And remember that you can use the ~C~I#V~N and ~C~I#P~H Commands~N in the ~HComments~N section
  143.  
  144. of ~G~ITests~N and ~G~IQuizzes~N. Just replace either the ~HComment~N above the ~HResults Graph~N
  145.  
  146. or the one below it with ~C~I#Vvoicefile~N or ~C~I#Pmusicfile~N.
  147.  
  148. #WP
  149. %
  150. #EF
  151. #T
  152. #C2,R5
  153. Now let's look at the 'snapshot' ~HTEXT~N Screens.  Included with ~H~bTutorialWriter~N
  154.  
  155. is a ~Hmemory resident program~N called ~G~ITWSNAP.COM~N.  When you type ~G~ITWSNAP~N, the
  156.  
  157. program loads into memory, then when you press ~HALT-S~N ( hold down the ALT
  158.  
  159. key and press the S key ) it will copy anything on the screen into a disk
  160.  
  161. file.  These files are automatically named ~G~ITWSNAP.000~N, then ~G~ITWSNAP.001~N etc.
  162.  
  163.  
  164.              ~H~r  REMEMBER this only applies to TEXT SCREENS.  ~N
  165.  
  166.  
  167. When you have finished using ~G~ITWSNAP~N, just type ~G~ITWSNAP~N again and it will
  168.  
  169. remove itself from memory, provided that you haven't loaded any other memory
  170.  
  171. resident programs after it. If you have it will give you a warning message.
  172. #WP
  173. %
  174. #EF
  175. #T
  176. #C2,R5
  177. Copy the ~G~ITWSNAP.00?~N files to your ~H~bTutorialWriter~N directory and using the
  178.  
  179. ~G~IAuthor Utilities~N  select ~G~ITextscreens~N and ~C~IAdd a Screen~N.
  180.  
  181.  
  182.  
  183. At the ~HEntry~N screen you will be asked for a file name .  Press ~HF1~N and all files
  184.  
  185. called ~C~ITWSNAP.???~N will be displayed. Choose the one you want and give it an
  186.  
  187. ~HIdentifier name~N.
  188.  
  189.  
  190.  
  191. ~G~ITWRITER~N will store it under that ~Hidentifier~N in your ~G~ITextscreen~N file. Then you
  192.  
  193. can call it up in your ~M~ITutorial~N, using the ~HCommand~C~I #GT,identifier~N.
  194.  
  195. To see what all that looks like, here's the ~HEntry~N screen.
  196. #WP
  197. #EF
  198. #GT,showtextscreen1
  199.  
  200. #EL,25
  201. #D5
  202.  
  203. #BO,3,13,47,20,7,1,0,6,1,3
  204. You have probably taken a number of
  205. SCREEN SNAPS. Enter the filename of the
  206. TWSNAP file you want and an identifier
  207. name that the SNAP will be stored under
  208. in the SCREEN file. Just press F1 to
  209. get the file names.
  210.  
  211. #GT,showtextscreen2
  212. #D2
  213.  
  214. #BO,3,14,40,18,7,1,0,3,1,3
  215. Choose the one you want and make
  216. up a identifier name for it.
  217. And that's how easy it is!!
  218.  
  219. #EL,25
  220. #W
  221. %
  222. #EF
  223. #T
  224. #C2,R5
  225. Now here is something that you can do with these '~Hsnapshots~N'. When they are
  226.  
  227. popped on to the screen, they are just like any other screen that has been
  228.  
  229. written, so you can use ~C~I#Cx,Ry~N to move around and modify them.
  230.  
  231.  
  232.  
  233. Let's say that using a ~HText Screen Editor~N, you design your dream home and
  234.  
  235. use ~G~ITWSNAP~N to take a snap. You've used the ~G~IUtility~N program to store it in
  236.  
  237. the ~G~ISCREEN~N file as ~C~Idreamhouse~N.
  238.  
  239.  
  240.  
  241. Now you can call it up with ~C~I#GT,dreamhouse~N.
  242. #WP
  243.  
  244. #GT,dreamhouse
  245. #WN
  246. %
  247. #EF
  248. #T
  249. #C2,R5
  250. Now, using the ~HCursor Control Commands~N and the ~HHYPERTEXT~N capability you
  251.  
  252. put ~HButtons~N on your drawing ( Remember to define them with the ~HHYPERTEXT~N
  253.  
  254. ~C~IUtility program~N ).
  255. #C1
  256.  
  257. {#GT,dreamhouse
  258. {#TDREAM HOUSE
  259. {#C10,R8
  260. {|Bill's Room|
  261. {#C23,R11
  262. {|Bathroom|
  263. {#C33,R8
  264. {|Bert's Room|
  265. etc.
  266. #C2
  267.  
  268. And here's the final screen.  Use the Space Bar or the MOUSE to move around
  269.  
  270. the Buttons, ENTER key or MOUSE button to select.
  271. #WN
  272. #GT,dreamhouse
  273. #TDREAM HOUSE
  274. #C10,R8
  275. |Bill's Room|
  276. #C23,R11
  277. |Bathroom|
  278. #C33,R8
  279. |Bert's Room|
  280. #C54,R8
  281. |Sitting Room|
  282. #C10,R15
  283. |Bath|
  284. #C9,R20
  285. |Dressing|
  286. #C24,R19
  287. |Master|
  288. #C60,R21
  289. |Dining|
  290. #C47,R21
  291. |Kitchen|
  292. #WP
  293. %
  294. #EF
  295. #TMULTI - MEDIA
  296. #C2,R5
  297. There is another ~C~I#G~H Command~N which is very similar to ~C~I#GT,identifier~N.  It is
  298. ~C~I#GA,ANSIfile.ext~N.  This ~HCommand~N pops an ~G~IANSI~N file on to the screen, just like
  299. a ~HTextscreen~N file. And like a ~HTextscreen~N file, you can use ~H~bTutorialWriter~N's
  300. ~HCommands~N to modify it.
  301.  
  302.  
  303. To display an ~G~IANSI~N file, you must have ~G~IANSI.SYS~N loaded in your ~G~IDOS CONFIG.SYS~N
  304. Almost all computers today have that as standard. But ~C~I#GA~N checks anyway and
  305. will warn you if it is not there, suggesting that you load it by following the
  306. instructions in your ~G~IDOS~N Manual.
  307.  
  308.  
  309. The advantage of ~G~IANSI~N files is that they permit limited ~HAnimation~N. And there
  310. are many ~G~IANSI~H Editor~N programs available which let you create ~G~IANSI~N files.
  311. Here's how to use the ~C~I#GA~H Command~N :
  312.  
  313. ~H#GA,judge.ans
  314. ~H#C8,R23
  315. ~H~~H~~KTutorialWriter wins the Verdict. It's the BEST.  Case closed!!~~N~~k
  316. #W
  317. #EF
  318. #GA,judge.ans
  319. #C8,R23
  320. ~H~KTutorialWriter wins the Verdict. It's the BEST.  Case closed!!~N~k
  321. #WP
  322. %
  323. #EF
  324. #T
  325. #C2,R5
  326. But if you want to show a graphics screen - perhaps a ~HPCX~N file - or even run
  327. another program from inside your ~M~Itutorial~N - e.g. a program which draws a
  328. graph or does something fancy to the screen, then there is another ~HCommand~N
  329. available - ~C~I#U~N
  330.  
  331.  
  332. The ~HCommand~C~I #Ufilename.ext~N[~C~I,Parameters~N] allows you to run an executable
  333. program ( ~H.EXE~N, ~H.COM~N or ~H.BAT~N ) from within your tutorial.  If the program
  334. does not take parameters i.e. the program name alone runs it, then follow
  335. the ~C~I#U~H Command~N with the ~Hfull program name, including the extension~N.
  336.  
  337.  
  338. To give you an example of how this ~HCommand~N is used, I have included a file
  339. called ~G~IUSFLAG.EXE~N with this ~C~ITutorial~N.  This is a .PCX file which has been
  340. converted to an executable program.
  341.  
  342.  
  343. To activate this program, the ~HCommand~N is ~C~I#Uusflag.exe~N.
  344. #WP
  345. %
  346. #EF
  347. #T
  348. #C2,R5
  349. Many graphic display programs require a number of parameters to be passed.
  350.  
  351. Let's say you have one of these, called perhaps ~G~IShowpics.exe~N, which takes
  352.  
  353. the parameters ~G~IDisplayType~N ( either ~G~IEGA~N or ~G~ICGA~N ) and ~G~IPicturefilename~N.  The
  354.  
  355. ~HCommand~N would be ~C~I#Ushowpics.exe,EGA MyPic.pcx~N.  The parameter section of the
  356.  
  357. ~HCommand~N, which follows the comma, requires parameters to be ~Hseparated by one
  358.  
  359. space~N when there is more than one parameter being passed.
  360.  
  361. Let's look at an example of a simple executable file, which will point out
  362.  
  363. some other items to note.
  364.  
  365. ~H#Uusflag.exe
  366. ~H#WN
  367. #WP
  368. #Uusflag.exe
  369. #WN
  370. #EF
  371. #T
  372. #C2,R5
  373. The return to a blank screen from the executable points up something else
  374. you may need to take care of.  ~HSome executables save the screen before they
  375. display the file and restore it afterwards, but most do not~N. This demo
  376. program does not.  So if you want to come back to this screen to add more
  377. comments, you have to ~Hsave it with the ~C~I#SK,S,n ~HCommand~N, and restore it when
  378. the executable program returns control to ~G~ITWTEACH~N.
  379.  
  380. And did you notice that the Cursor had been turned on?  Use the ~HCommand~C~I #OF~N
  381. to turn it off again. (You can also use the opposite ~HCommand~N, ~C~I#ON~N, if you ever
  382. need to turn it on).
  383.  
  384. ~H#SK,S,1
  385. ~H#Uusflag.exe
  386. ~H#SK,R,D,1
  387. ~H#SK,D,1
  388. ~H#C40,R18
  389. ~H#OF
  390. ~H~~K~~HHow about that!!!~~N~~k
  391. ~H#W
  392. #W
  393. #SK,S,1
  394. #Uusflag.exe
  395. #SK,R,D,1
  396. #SK,D,1
  397. #C40,R18
  398. #OF
  399. ~K~HHow about that!!!~N~k
  400. #EL,25
  401. #WP
  402. %
  403. #EF
  404. #T
  405. #C2,R8
  406. Alternatively, you may want to continue on a new screen.
  407.  
  408. ~H#Uusflag.exe
  409. ~H#OF
  410. ~H#T
  411. ~H#C2,R5
  412. ~HStart again from here.
  413. ~H#W
  414. #W
  415. #Uusflag.exe
  416. #OF
  417. #T
  418. #C2,R5
  419. Start again from here.
  420. #WP
  421. %
  422. #EF
  423. #T
  424. #C2,R5
  425. An important aspect which must be considered when using ~C~I#U~N is the amount
  426.  
  427. of computer memory available.  ~HWhen an executable program runs, it does
  428.  
  429. so in the amount of memory left unused by the ~M~Itutorial program~N.  This raises
  430.  
  431. two points.  The ~G~ITWTEACH~N program which you will distribute with your
  432.  
  433. application needs ~H100K of RAM for itself and a further 30K to enable it to
  434.  
  435. handle screen saves, etc. ( up to a max of 6 at one time )~N. If an executable
  436.  
  437. program does not run on a particular computer, you will have to advise the
  438.  
  439. user to ~Hremove any RAM resident programs from memory~N.  If it still does not
  440.  
  441. run then ~Hthere is not enough memory available~N on that computer.
  442.  
  443. #WP
  444. %
  445. #EF
  446. #T
  447. #C2,R7
  448. The second point is that, in your case, the ~H~bTutorialWriter~H Integrated
  449.  
  450. Development Environment, ~G~ITWRITER~N, needs ~H200K for itself and a further 30k for
  451.  
  452. editing text files, storing variables, etc~N.   So when you test an application
  453.  
  454. which uses an executable program from within the ~H~bTutorialWriter~H Environment
  455.  
  456. ( using ~C~I View Tutorial~N ), it may not work because of memory limitations.
  457.  
  458. If this happpens, exit from the ~HIntegrated Development Environment~N and test
  459.  
  460. the application using ~G~ITWTEACH~N.
  461. #WP
  462. %
  463. #EF
  464. #T
  465. #AB,2
  466. HAPPY
  467. TUTORING
  468. #WP
  469. #X
  470.