home *** CD-ROM | disk | FTP | other *** search
/ The Ultimedia System / IBM_ACD_101.ISO / tbkeval / mwidget.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1992-01-28  |  136KB  |  2,846 lines

  1. 4s_bmpHandle
  2. ofileName
  3. rightButtonup
  4. B's bitmap 
  5. fa popup 
  6. tbkBitmapchk("
  7. " && 
  8. d && "alias dibFile style overlapped 
  9. " && 
  10. , 1, 1)
  11. " && 
  12. ox & "," & 
  13. oy,1)
  14. cate 
  15. translating 
  16. emessages 
  17. ("status 
  18.     translatewindowmessage 
  19. bmpWindowClose 
  20. bmpButtonup 
  21. --dismiss 
  22. they click 
  23. BMPbuttonUp
  24.     --we use a 
  25. here since a timer
  26.     --notification handler might 
  27. doesn't have access 
  28. container
  29.     untranslateAllWindowMessages 
  30. ("close 
  31. edirectly (Alt-f4)
  32. lets 
  33. efinish closing 
  34. 4sending a 
  35.     --which 
  36. turn sends a bmpButtonDown 
  37. windows 
  38. tbkTimerStart("single",500,100,
  39. tbkMMTimer
  40. bmpButtonUp
  41. OpenDlg(".", "*.*", "Choose a 
  42. (.dib 
  43.  extensions)", "
  44. ox & "," & 
  45. "0,0"
  46. ("Would you like 
  47. specify 
  48. e? If so, please enter 2 numeric coordinates." 
  49. ) <> 2
  50. "Invalid 
  51. x"0" 
  52. xisNumber(
  53. "Coordinate 
  54. z" && i && "
  55. tonUp
  56. buttonUp
  57. bmpWindowClose
  58. tbkMMTimer
  59. BMPbuttonUp
  60. rightButtonUp
  61. buttonUp
  62. fileName
  63. prightButtonup
  64. fileName
  65. alias dibFile style overlapped parent
  66. tbkBitmapchk
  67. window dibFile position
  68. tbkBitmapchk
  69. window dibFile state show
  70. tbkBitmapchk
  71. status dibFile window
  72. tbkBitmap
  73. bmpWindowClose
  74. bmpButtonup
  75. s_bmpHandle
  76. BMPbuttonUp
  77. close dibFile
  78. tbkBitmap
  79. s_bmpHandle
  80. bmpWindowClose
  81. single
  82. tbkTimerStart
  83. tbkMMTimer
  84. bmpButtonUp
  85. rightButtonUp
  86. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  87. Choose Bitmap File
  88. OpenDlg
  89. fileName
  90. fileName
  91. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  92. cancel
  93. Invalid number of coordinates.
  94. isNumber
  95. Coordinate number
  96. is not a number.
  97. Multimedia, MCI and Toolbook
  98. Widget Font Quick Reference
  99. 4s_oldScroll
  100. "widgetFont" 
  101. "bigfontlist"
  102. enterpage
  103. leavepage
  104. enterpage
  105. widgetFont
  106. s_oldScroll
  107. leavepage
  108. bigfontlist
  109. widgetFont
  110. s_oldScroll
  111. The Widget Font
  112. Quick Reference
  113. The font TBKMMWID.FON supplied with Multimedia ToolBook is installed dynamically into your system when ToolBook is started with TBKMM.SBK as a system book.  The file TBKMMWID.FON itself must be in the DOS path.
  114. This font contains symbols for many multimedia controls and operations.  This table shows the ANSI values with the corresponding characters.rs.
  115. You can type any character by holding the Alt key down and typing the ANSI value of the character on the numeric keypad, with enough leading zeros for a total of  4 digits.  Release the Alt key when you have finished typing the ANSI value.
  116. Some characters in this font are designed to be used in pairs, for instance  
  117. The next page explains some of the advantages and disadvantages of using this special font...
  118.     ANSI         Widgettttt
  119. widgetFont
  120. buttonDown
  121. buttonDown
  122. textFromPoint
  123. 32         
  124. 33        !
  125. 34        "
  126. 35        #
  127. 36        $
  128. 37        %
  129. 38        &
  130. 39        '
  131. 40        (
  132. 41        )
  133. 42        *
  134. 43        +
  135. 44        ,
  136. 45        -
  137. 46        .
  138. 47        /
  139. 48        0
  140. 49        1
  141. 50        2
  142. 51        3
  143. 52        4
  144. 53        5
  145. 54        6
  146. 55        7
  147. 56        8
  148. 57        9
  149. 58        :
  150. 59        ;
  151. 60        <
  152. 61        =
  153. 62        >
  154. 63        ?
  155. 64        @
  156. 65        A
  157. 66        B
  158. 67        C
  159. 68        D
  160. 69        E
  161. 70        F
  162. 71        G
  163. 72        H
  164. 73        I
  165. 74        J
  166. 75        K
  167. 76        L
  168. 77        M
  169. 78        N
  170. 79        O
  171. 80        P
  172. 81        Q
  173. 82        R
  174. 83        S
  175. 84        T
  176. 85        U
  177. 86        V
  178. 87        W
  179. 88        X
  180. 89        Y
  181. 90        Z
  182. 91        [
  183. 92        \
  184. 93        ]
  185. 94        ^
  186. 95        _
  187. 96        `
  188. 97        a
  189. 98        b
  190. 99        c
  191. 100    d
  192. 101    e
  193. 102    f
  194. 103    g
  195. 104    h
  196. 105    i
  197. 106    j
  198. 107    k
  199. 108    l
  200. 109    m
  201. 110    n
  202. 111    o
  203. 112    p
  204. 113    q
  205. 114    r
  206. 115    s
  207. 116    t
  208. 117    u
  209. 118    v
  210. 119    w
  211. 120    x
  212. 121    y
  213. 122    z
  214. 123    {
  215. 124    |
  216. 125    }
  217. 126    ~
  218. "bigFontList"
  219. printerPageBitmap 
  220. FALSE
  221. buttonUp
  222. buttonUp
  223. bigFontList
  224. bigFontList
  225. bigFontList
  226. Print Font Reference Sheet
  227. "bigFontList"
  228. B"bigfontList"
  229. buttonUp
  230. buttonUp
  231. bigFontList
  232. bigfontList
  233. Show Font Reference Sheet
  234. Click a character to copy it to the clipboard.
  235. bigfontlist
  236. bigfontlist
  237. 032      033 !    034 "    035 #    036 $    037 %    038 &    039 '    040 (    041 )    042 *    043 +    044 ,    045 -    046 .    047 /    048 0    049 1    050 2    051 3    052 4    053 5    054 6    055 7    056 8    057 9    058 :    059 ;    060 <    061 =    062 >    063 ?    064 @    065 A    066 B    067 C    068 D    069 E    070 F    071 G    072 H    073 I    074 J    075 K    076 L    077 M    078 N    079 O    080 P    081 Q    082 R    083 S    084 T    085 U    086 V    087 W    088 X    089 Y    090 Z    091 [    092 \    093 ]    094 ^    095 _    096 `    097 a    098 b    099 c    100 d    101 e    102 f    103 g    104 h    105 i    106 j    107 k    108 l    109 m    110 n    111 o    112 p    113 q    114 r    115 s    116 t    117 u    118 v    119 w    120 x    121 y    122 z    123 {    124 |    125 }    126 ~    127 
  238.     128 
  239.     129 
  240.     130 
  241.     131 
  242.     132 
  243.     133 
  244.     134 
  245.     135 
  246.     136 
  247.     137 
  248.     138 
  249.     139 
  250.     140 
  251.     141 
  252.     142 
  253.     143 
  254.     144 
  255.     145 
  256.     146 
  257.     147 
  258.     148 
  259.     149 
  260.     150 
  261.     151 
  262.     152 
  263.     153 
  264.     154 
  265.     155 
  266.     156 
  267.     157 
  268.     158 
  269.     159 
  270.     160 
  271.     161 
  272.     162 
  273.     163 
  274.     164 
  275.     165 
  276.     166 
  277.     167 
  278.     168 
  279.     169 
  280.     170 
  281.     171 
  282.     172 
  283.     173 
  284.     174 
  285.     175 
  286.     176 
  287.     177 
  288.     178 
  289.     179 
  290.     180 
  291.     181 
  292.     182 
  293.     183 
  294.     184 
  295.     185 
  296.     186 
  297.     187 
  298.     188 
  299.     189 
  300.     190 
  301.     191 
  302.     192 
  303.     193 
  304.     194 
  305.     195 
  306.     196 
  307.     197 
  308.     198 
  309.     199 
  310.     200 
  311.     201 
  312.     202 
  313.     203 
  314.     204 
  315.     205 
  316.     206 
  317.     207 
  318.     208 
  319.     209 
  320.     210 
  321.     211 
  322.     212 
  323.     213 
  324.     214 
  325.     215 
  326.     216 
  327.     217 
  328.     218 
  329.     219 
  330.     220 
  331.     221 
  332.     222 
  333.     223 
  334.     224 
  335.     225 
  336.     226 
  337.     227 
  338.     228 
  339.     229 
  340.     230 
  341.     231 
  342.     232 
  343.     233 
  344.     234 
  345.     235 
  346.     236 
  347.     237 
  348.     238 
  349.     239 
  350.     240 
  351.     241 
  352.     242 
  353.     243 
  354.     244 
  355.     245 
  356.     246 
  357.     247 
  358.     248 
  359.     249 
  360.     250 
  361.     251 
  362.     252 
  363.     253 
  364.     254 
  365.                                         [OK]
  366. bigFontList
  367. &4S^/
  368. buttonUp
  369. buttonUp
  370. Cover Page
  371. |    T    y    
  372. Multimedia Widgets
  373. Multimedia Widgets
  374. This book contains ToolBook objects that can be copied and pasted into your own ToolBook application.
  375. This book contains ToolBook objects that can be copied and pasted into your own ToolBook application.
  376. buttonUp
  377. buttonUp
  378. Continue
  379. "map"
  380. buttonUp
  381. buttonUp
  382. txClassName
  383. button
  384. defStroke
  385. 0,0,0
  386. oft Exce
  387. Cover Page
  388. What these objects do:
  389. Page Title
  390. Description
  391. Dependencies
  392. Instructions:
  393. buttonUp
  394. buttonUp
  395. txClassName
  396. button
  397. defStroke
  398. 0,0,0
  399. Previous
  400. buttonUp
  401. buttonUp
  402. txClassName
  403. button
  404. defStroke
  405. 0,0,0
  406. buttonUp
  407. buttonUp
  408. txClassName
  409. button
  410. defStroke
  411. 0,0,0
  412. "map"
  413. buttonUp
  414. buttonUp
  415. defStroke
  416. 0,0,0
  417. txClassName
  418. button
  419. Search
  420. buttonUp
  421. buttonUp
  422. search
  423. ,         OK
  424. J    >    defStroke
  425. 0,0,0
  426. ^    txClassName
  427. button
  428. Search...
  429. Instructions on how to install Widgets into your own book will appear in this space.
  430. Widgets throughout this book appear on pages like this one.
  431. The Widgets will appear in this space. space.
  432. An explanation of what the Widgets do will appear in this space.K
  433. The Widget's title appears here.e.
  434. buttonUp
  435. buttonUp
  436. Continue
  437. Sloc, isShift
  438. H0,30
  439. 4s_scroll
  440. FALSE
  441. "icons" 
  442. clearExplanation
  443. "explain"
  444. enterPage
  445. leavePage
  446. rightButtonUp
  447. clearExplanation
  448. rightButtonUp
  449. isShift
  450. enterPage
  451. icons
  452. s_scroll
  453. leavePage
  454. clearExplanation
  455. clearExplanation
  456. explain
  457. icons
  458. s_scroll
  459. ">#~#
  460. 9,;X<
  461. FHLHLHL
  462. This is the map page.
  463. Click topic names shown in black and white to go to a topic.
  464. icons
  465. buttonUp
  466. buttonUp
  467. txClassName
  468. button
  469. defStroke
  470. 0,0,0
  471. Previous
  472. buttonUp
  473. buttonUp
  474. txClassName
  475. button
  476. defStroke
  477. 0,0,0
  478. buttonUp
  479. buttonUp
  480. txClassName
  481. button
  482. defStroke
  483. 0,0,0
  484. defStroke
  485. 0,0,0
  486. txClassName
  487. button
  488. Search
  489. buttonUp
  490. buttonUp
  491. search
  492. defStroke
  493. 0,0,0
  494. txClassName
  495. button
  496. Search...
  497. "Wave Audio:
  498.     File Buttons"
  499. buttonUp
  500. buttonUp
  501. Wave Audio:  Wave File Buttons
  502. Wave Audio
  503. "Bitmap Graphics:
  504. Buttons"
  505. buttonUp
  506. buttonUp
  507. Bitmap Graphics:  Bitmap Buttons
  508. Bitmap Graphics
  509. "Topics shown 
  510. are only available 
  511. fthe full version 
  512. Multimedia ToolBook 
  513. Asymetrix's 
  514. Resource Kit."
  515. buttonUp
  516. buttonUp
  517. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  518. offsetNumber
  519. Generic Bitmap Buttons
  520. A Bitmap Index
  521. "CD Audio:
  522. Event Editor"
  523. buttonUp
  524. buttonUp
  525. CD Audio:  Event Editor
  526. CD Audio
  527. "Topics shown 
  528. are only available 
  529. fthe full version 
  530. Multimedia ToolBook 
  531. Asymetrix's 
  532. Resource Kit."
  533. buttonUp
  534. buttonUp
  535. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  536. offsetNumber
  537. Small Controls
  538. Large Controls
  539. Track Selector
  540. Capability and Status
  541. Event Editor
  542. CD to Wave Converter
  543. "Topics shown 
  544. are only available 
  545. fthe full version 
  546. Multimedia ToolBook 
  547. Asymetrix's 
  548. Resource Kit."
  549. buttonUp
  550. buttonUp
  551. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  552. "Topics shown 
  553. are only available 
  554. fthe full version 
  555. Multimedia ToolBook 
  556. Asymetrix's 
  557. Resource Kit."
  558. buttonUp
  559. buttonUp
  560. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  561. offsetNumber
  562. Generic MIDI Buttons
  563. Simple Controls
  564. Capability and Status
  565. Event Editor
  566. MIDI to Wave Converter
  567. "Topics shown 
  568. are only available 
  569. fthe full version 
  570. Multimedia ToolBook 
  571. Asymetrix's 
  572. Resource Kit."
  573. buttonUp
  574. buttonUp
  575. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  576. Animation
  577. "Topics shown 
  578. are only available 
  579. fthe full version 
  580. Multimedia ToolBook 
  581. Asymetrix's 
  582. Resource Kit."
  583. buttonUp
  584. buttonUp
  585. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  586. offsetNumber
  587. Generic Animation Buttons
  588. More Buttons
  589. Control Panel
  590. Capability and Status
  591. Event Editor
  592. "Topics shown 
  593. are only available 
  594. fthe full version 
  595. Multimedia ToolBook 
  596. Asymetrix's 
  597. Resource Kit."
  598. buttonUp
  599. buttonUp
  600. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  601. Videodisc
  602. "Topics shown 
  603. are only available 
  604. fthe full version 
  605. Multimedia ToolBook 
  606. Asymetrix's 
  607. Resource Kit."
  608. buttonUp
  609. buttonUp
  610. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  611. "offsetNumber
  612. Simple Controls
  613. A Control Panel
  614. Capability and Status
  615. Event Editorr
  616. Timers
  617. "Generic:
  618. 3D Objects"
  619. buttonUp
  620. buttonUp
  621. Generic:  3D Objects
  622. Generic Controls
  623. "About This Widget Book"
  624. buttonUp
  625. buttonUp
  626. About This Widget Book
  627. Reference
  628. "Bitmap Graphics:
  629. Buttons"
  630. buttonUp
  631. buttonUp
  632. Bitmap Graphics:  Bitmap Buttons
  633. H&offsetNumber
  634. Generic Bitmap ButtonsSimple Controls
  635. Recording Controls
  636. Capability and Status
  637. Sound and Animation
  638. Event Editor
  639. & "}," & \
  640. ," & \
  641. ," & \
  642. ," & \
  643. "CD Audio:
  644. Event Editor"
  645. buttonUp
  646. buttonUp
  647. CD Audio:  Event Editor
  648. 'offsetNumber
  649. Event Editor
  650. "Topics shown 
  651. are only available 
  652. fthe full version 
  653. Multimedia ToolBook 
  654. Asymetrix's 
  655. Resource Kit."
  656. buttonUp
  657. buttonUp
  658. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  659. .*offsetNumber
  660. 3D Objects
  661. Horizontal Sliders
  662. Vertical Sliders
  663. Fancy Sliders
  664. Dog Sliders
  665. Audio Mixer
  666. Animation
  667. Event Editor
  668.  & "}," & \
  669. ," & \
  670. ," & \
  671. ," & \
  672. "Generic:
  673. 3D Objects"
  674. buttonUp
  675. buttonUp
  676. Generic:  3D Objects
  677. \,offsetNumber
  678. 3D Objects
  679. "Generic:
  680. Horizontal Sliders"
  681. buttonUp
  682. buttonUp
  683. Generic:  Horizontal Sliders
  684. -offsetNumber
  685. Horizontal Sliders
  686. "Topics shown 
  687. are only available 
  688. fthe full version 
  689. Multimedia ToolBook 
  690. Asymetrix's 
  691. Resource Kit."
  692. buttonUp
  693. buttonUp
  694. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  695. \/offsetNumber
  696. About this Widget Book
  697. About Multimedia
  698. Font Quick Reference
  699. Using the Widget Font
  700. Widget Dependencies
  701. Using Check Functions
  702. Window Styles
  703. "About This Widget Book"
  704. buttonUp
  705. buttonUp
  706. About This Widget Book
  707. ~1offsetNumber
  708. About this Widget Book
  709. "Widget Font Quick Reference"
  710. buttonUp
  711. buttonUp
  712. Widget Font Quick Reference
  713. 2offsetNumber
  714. Font Quick Reference
  715. "Topics shown 
  716. are only available 
  717. fthe full version 
  718. Multimedia ToolBook 
  719. Asymetrix's 
  720. Resource Kit."
  721. buttonUp
  722. buttonUp
  723. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  724. |4offsetNumber
  725. Simple Timing Controls
  726. Capabilityndex
  727. "Topics shown 
  728. are only available 
  729. fthe full version 
  730. Multimedia ToolBook 
  731. Asymetrix's 
  732. Resource Kit."
  733. buttonUp
  734. buttonUp
  735. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  736. 6offsetNumber
  737. Generic Wave Buttons
  738. Simple Controls
  739. Recording Controls
  740. Capability and Status
  741. Sound and Bitmaps
  742. Sound and Animation
  743. Event Editor
  744. ," & \
  745. ," & \
  746. ," & \
  747. "Wave Audio:
  748.     File Buttons"
  749. buttonUp
  750. buttonUp
  751. Wave Audio:  Wave File Buttons
  752. 29offsetNumber
  753. Generic Wave Buttons
  754. Simple Controls
  755. Recording Controls
  756. Capability and Status
  757. Sound and Animation
  758. Event Editor
  759. & "}," & \
  760. ," & \
  761. ," & \
  762. ," & \
  763. "Wave Audio:
  764. Sound 
  765. Animation"
  766. buttonUp
  767. buttonUp
  768. Wave Audio:  Sound and Animation
  769. :offsetNumber
  770. Sound and Animation
  771. "Wave Audio:
  772. Sound 
  773. Bitmaps"
  774. buttonUp
  775. buttonUp
  776. Wave Audio:  Sound and Bitmaps
  777.  <offsetNumber
  778. Sound and Bitmapson
  779. Beginner:
  780. "Beginner widgets only need 
  781. be copied 
  782. pasted 
  783. your own 
  784. Fhave a media file 
  785. pspecified 
  786. them."
  787. buttonUp
  788. buttonUp
  789. Beginner widgets only need to be copied and pasted into your own application, and then have a media file name specified for them.
  790. Intermediate:
  791. "Intermediate widgets need 
  792. be copied 
  793. pasted 
  794. your 
  795. Fhave more than one 
  796. G file 
  797. pspecified 
  798. them.
  799. Or they may 
  800. points 
  801. a sound clip 
  802. buttonUp
  803. buttonUp
  804. Intermediate widgets need to be copied and pasted into your application, and then have more than one media file name specified for them.  Or they may need the start and end points of a sound clip specified.
  805. \B4BYB
  806. Advanced:
  807. "Advanced widgets require doing some OpenScript coding."
  808. buttonUp
  809. buttonUp
  810. Advanced widgets require doing some OpenScript coding.
  811. "Multimedia, MCI 
  812. Toolbook"
  813. buttonUp
  814. buttonUp
  815. Multimedia, MCI and Toolbook
  816. xDoffsetNumber
  817. About Multimedia
  818. "Topics shown 
  819. are only available 
  820. fthe full version 
  821. Multimedia ToolBook 
  822. Asymetrix's 
  823. Resource Kit."
  824. buttonUp
  825. buttonUp
  826. Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
  827. 4s_device
  828. Zswitch, x
  829. -(y1, 
  830. "off"
  831. tbkMCI("stop cdAudio wait","")
  832. --use 
  833. asure 
  834. worked
  835. :close 
  836. 5","")
  837. 0,50.1875,0
  838. the CD 
  839. tbkMCIchk("
  840. shareable","",1,1)
  841. ms","",1)
  842. audio 
  843. on","")
  844.         --beginning 
  845. atus 
  846. track 1","")
  847. H1000
  848. " && 
  849. msf","",1,1)
  850. FALSE
  851. updateStatus
  852. buttonUp
  853. buttonUp
  854. false
  855. stop cdAudio wait
  856. tbkMCI
  857. close cdAudio
  858. tbkMCI
  859. open cdAudio shareable
  860. tbkMCIchk
  861. set cdAudio time format ms
  862. tbkMCIchk
  863. set cdAudio audio all on
  864. tbkMCI
  865. status cdAudio position track 1
  866. tbkMCI
  867. seek cdAudio to
  868. tbkMCI
  869. set cdAudio time format msf
  870. tbkMCIchk
  871. cdAudio
  872. 120,50,100
  873. _9updateStatus
  874. switch
  875. s_device
  876. MIDI Sequencer:  Buttons
  877. Page Index
  878. Generic:  Horizontal Sliders
  879. Wave Audio:  Wave File Buttons
  880. tbkMCI("close waveFile","")
  881. enterPage
  882. leavePage
  883. enterPage
  884. leavePage
  885. close waveFile
  886. tbkMCI
  887. 1. Copy one of these buttons to the clipboard.
  888. 2. Go to your own ToolBook application and make sure you're at Author level.
  889. 3. Paste the button from the clipboard into your own application.
  890. 4. Switch to Reader level.
  891. 2. Click the button you pasted with your RIGHT mouse button
  892. 3. You'll be prompted for a file name. Choose the name of a wave audio file and click OK.
  893. 4. Click the button with your LEFT mouse button to play the wave file.
  894. 5. To assign a different wave file to the button, RIGHT click it again.
  895. These buttons play wave audio files.
  896. The Play and Wait button's buttonDown handler opens, plays and closes its wave file using the 
  897.  wait  parameter.  This delays subsequent OpenScript statements from executing until the wave  file finishes playing and closes.
  898. The Play and Notify button specifies itself as the  notification object .  Its buttonDown handler plays a wave file, but its tbkmmNotify handler closes the wave file.
  899.  file.
  900. editScript "wait", 
  901. B"Play 
  902. Wait"
  903. buttonDown
  904. buttonDown
  905. editScript
  906. Play and Wait
  907. editScript "
  908. B"Play And Notify"
  909. buttonDown
  910. buttonDown
  911. editScript
  912. Play And Notify
  913. Generic Wave Buttons
  914. Play and Wait
  915. ofileName
  916. tbkMCI("status wavefile mode","") 
  917. c"play"
  918. ,close waveFile","")
  919. alias
  920. tbkMCIchk("
  921. " && 
  922.  && "
  923. H,1,1)
  924. X wait","",1)
  925. --prompt 
  926. OpenDlg(".", "*.
  927. ", "Choose a 
  928. B.", "
  929. Wave 
  930. buttonDown
  931. rightButtonUp
  932. buttonDown
  933. fileName
  934. prightButtonUp
  935. status wavefile mode
  936. tbkMCI
  937. close waveFile
  938. tbkMCI
  939. fileName
  940. alias waveFile
  941. tbkMCIchk
  942. play waveFile wait
  943. tbkMCIchk
  944. close waveFile
  945. tbkMCIchk
  946. rightButtonUp
  947. *.wav
  948. Choose a wave file for this button.
  949. Choose Wave File
  950. OpenDlg
  951. fileName
  952. fileName
  953. Play and Wait
  954. Play and Notify
  955. ofileName
  956. tbkMCI("close waveFile","")
  957. tbkMCIchk("
  958. " && 
  959. M && "alias 
  960. /,1,1)
  961. )play 
  962. tbkmmNotify
  963. lstatus 
  964. g mode","")
  965. c"stop" 
  966. OpenDlg(".", "*.
  967. ", "Choose a 
  968. B.", "
  969. Wave 
  970. uttonDown
  971. tbkmmNotify
  972. buttonDown
  973. rightButtonUp
  974. buttonDown
  975. fileName
  976. prightButtonUp
  977. close waveFile
  978. tbkMCI
  979. fileName
  980. alias waveFile
  981. tbkMCIchk
  982. play waveFile
  983. tbkMCIchk
  984. tbkmmNotify
  985. status waveFile mode
  986. tbkMCI
  987. pause
  988. close waveFile
  989. tbkMCI
  990. rightButtonUp
  991. *.wav
  992. Choose a wave file for this button.
  993. Choose Wave File
  994. OpenDlg
  995. fileName
  996. fileName
  997. Play and Notify
  998. Copy Object
  999. "copyInstructions" 
  1000. Zobj, pos
  1001. eatclicks()
  1002. "down"
  1003. objectFromPoint(
  1004. buttonDown
  1005. buttonUp
  1006. buttonDown
  1007. copyInstructions
  1008. buttonUp
  1009. eatclicks
  1010. copyInstructions
  1011. eatclicks
  1012. copyInstructions
  1013. of background
  1014. hotword
  1015. recordfield
  1016. Click me to copy a button
  1017. About This Widget Book
  1018. noAutoName
  1019. About this Widget Book(Please read this))))
  1020. Widget:  A small contrivance.
  1021. This book contains a collection of widgets and scripts that you can use in your own applications.  These widgets use the multimedia extensions to ToolBook and the underlying Microsoft multimedia extensions to Windows.
  1022. When the devices and drivers are available, the widgets in this book are fully functional.  Some require data files.
  1023. e pasted a widget, you can..............................................
  1024. You can use the widgets in several ways:  
  1025. * Copy the generic buttons from the Simple Button pages, then paste them into your applications.  After right-clicking them to assign them a wave, MIDI, bitmap or animation file, they'll play that file when you click them.
  1026. * Copy widgets and control panels, then paste them into your applications.  You can modify them to suit your particular requirements.
  1027. * Use widget scripts as examples for your own scripts.
  1028. dia extensions to ToolBook.  Most widgets are directly MCI-compatible.
  1029. -compatible.
  1030. ompatible.
  1031. irectly MCI-compatible.
  1032. * You can use the widget book to exercise the system.
  1033. * Use the widget book to exercise the system.
  1034. * Use the event editors to create buttons that play clips of wave, MIDI and animation files, or clips from CDs and laserdiscs.  You can use these scripts for hotwords too.
  1035. On many pages, you can click hotwords to see the relevant scripts.  Those scripts will appear in the script editor window with the relevant section highlighted.  You can copy these scripts to the clipboard without going to author level.u can copy these scripts to the clipboard without going to author level.clipboard without going to author level.
  1036. About this Widget Book
  1037. raphics: Dynamic Bitmap
  1038. Window Styles
  1039. Bitmap Graphics:  Bitmap Buttons
  1040.     --close bitmap that might be 
  1041. tbkBitmap("
  1042. )dibFile")
  1043. leavePage
  1044. leavePage
  1045. close dibFile
  1046. tbkBitmap
  1047. close
  1048. 1. Copy one of these buttons to the clipboard.
  1049. 2. Go to your own ToolBook application and make sure you're at Author level.
  1050. 3. Paste the button from the clipboard into your own application.
  1051. 4. Switch to Reader level.
  1052. 5. Click the button you pasted with your RIGHT mouse button
  1053. 6. You'll be prompted for a file name. Choose the name of a bitmap file and click OK.
  1054. 7. Click the button with your LEFT mouse button to show the bitmap.
  1055. 8. Click the bitmap to close it.  If its in an overlapped window, press Alt+F4 to close it.
  1056. 9. To assign a different bitmap to the button, RIGHT click it again...
  1057. These buttons let you show device independent bitmaps (DIBs) in their own windows.  
  1058. They use the  translateWindowMessage  control structure to trap mouse clicks in the bitmap window.  This sends a ToolBook message. The message's handler closes the bitmap file.  The Overlapped Window Style button also traps a windows  destroy  message..
  1059. editScript "translatewindowmessage 
  1060. s_bmpHandle", 
  1061. B"generic popup bitmap"
  1062. buttonDown
  1063. buttonDown
  1064. editScript
  1065. translatewindowmessage for s_bmpHandle
  1066. generic popup bitmap
  1067. editScript "
  1068. bmpWindowClose 
  1069. B"generic overlapped bitmap"
  1070. buttonDown
  1071. buttonDown
  1072. editScript
  1073. before 2 send bmpWindowClose to self
  1074. generic overlapped bitmap
  1075. Generic Bitmap Buttons
  1076. close
  1077. Click the bitmap's window to close it.
  1078. Generic Popup Bitmap
  1079. Popup Window Style
  1080. Generic Child Bitmap
  1081. Child Window Style
  1082. Generic Overlapped Bitmap
  1083. Overlapped Window Style
  1084. Copy Object
  1085. "copyInstructions" 
  1086. Zobj, pos
  1087. eatclicks()
  1088. "down"
  1089. objectFromPoint(
  1090. buttonDown
  1091. buttonUp
  1092. buttonDown
  1093. copyInstructions
  1094. buttonUp
  1095. eatclicks
  1096. copyInstructions
  1097. eatclicks
  1098. copyInstructions
  1099. of background
  1100. hotword
  1101. recordfield
  1102. Click me to copy a button
  1103. 4s_bmpHandle
  1104. ofileName
  1105. rightButtonup
  1106. B's bitmap 
  1107. fa popup 
  1108. tbkBitmapchk("
  1109. " && 
  1110. d && "alias dibFile style 
  1111. B", 1, 1)
  1112. " && 
  1113. ox & "," & 
  1114. oy,1)
  1115. Rate 
  1116. translating 
  1117. emessages 
  1118. ("status 
  1119.     translatewindowmessage 
  1120. bmpWindowClose 
  1121. bmpButtonup 
  1122. --dismiss 
  1123. they click 
  1124. BMPbuttonUp
  1125.     untranslateAllWindowMessages 
  1126. ("close 
  1127. a timer 
  1128. edirectly (Alt-f4)
  1129. lets 
  1130. efinish closing 
  1131. 4sending a 
  1132.     --which 
  1133. turn sends a bmpButtonDown 
  1134. windows 
  1135. tbkTimerStart("single",500,100,
  1136. tbkMMTimer
  1137. bmpButtonUp
  1138. OpenDlg(".", "*.*", "Choose a 
  1139. (.dib 
  1140.  extensions)", "
  1141. ox & "," & 
  1142. "0,0"
  1143. ("Would you like 
  1144. specify 
  1145. e? If so, please enter 2 numeric coordinates." 
  1146. ) <> 2
  1147. "Invalid 
  1148. x"0" 
  1149. xisNumber(
  1150. "Coordinate 
  1151. z" && i && "
  1152. tonUp
  1153. buttonUp
  1154. bmpWindowClose
  1155. tbkMMTimer
  1156. BMPbuttonUp
  1157. rightButtonUp
  1158. buttonUp
  1159. fileName
  1160. prightButtonup
  1161. fileName
  1162. alias dibFile style popup
  1163. tbkBitmapchk
  1164. window dibFile position
  1165. tbkBitmapchk
  1166. window dibFile state show
  1167. tbkBitmapchk
  1168. status dibFile window
  1169. tbkBitmap
  1170. bmpWindowClose
  1171. bmpButtonup
  1172. s_bmpHandle
  1173. BMPbuttonUp
  1174. close dibFile
  1175. tbkBitmap
  1176. s_bmpHandle
  1177. bmpWindowClose
  1178. single
  1179. tbkTimerStart
  1180. tbkMMTimer
  1181. bmpButtonUp
  1182. rightButtonUp
  1183. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  1184. Choose Bitmap File
  1185. OpenDlg
  1186. fileName
  1187. fileName
  1188. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  1189. cancel
  1190. Invalid number of coordinates.
  1191. isNumber
  1192. Coordinate number
  1193. is not a number.
  1194. CD Audio:  Event Editor
  1195. More Buttons
  1196. Generic:  3D Objects
  1197. Generic:  3D Objects
  1198. 1. Copy one of these objects to the clipboard.
  1199. 2. Go to your own ToolBook application and make sure you're at Author level.
  1200. 3. Paste the object from the clipboard into your own application.
  1201. 4. Resize it or reposition it.
  1202. Notes:
  1203. The 3D objects on this page are simple graphic objects that can be useful in your layouts.  They are intended to be used on a gray background. These objects are actually groups; don't use too many at a time.
  1204. 3D fields are made of a group of 3 objects in which the field itself is the first element (the farthest) and the shadow and highlight are 90 degree angledLines. 
  1205. Other objects are made of various graphic objects, with the shadow as one element, the highlight as the middle element (or vice-versa, depending on whether the object is recessed), and the object itself as the last element.  
  1206. Some of these objects, such as 3D fields and rectangles, can be resized with no side effects.  The others are automatically repaired when you resize them.
  1207. The TBKMM.SBK sysBook script contains a handler for the sized message.  The sized message is sent to objects after they're resized at author level.  The txClassName user property determines how these groups are repaired when they're resized. You can change the properties of the field object in the 3D field by placing the focus in it, and then referring to it as "the focus" in the Command window.  The Field Properties menu command also becomes available when the focus is in a field, so you can display the Field Properties dialog box.  When your layout is final, ToolBook performance will be slightly better if you ungroup graphics that do not have to be grouped.
  1208. These objects can be copied to your application to give it a 3D appearance.
  1209. 3D Objects
  1210. (this is a field)
  1211. txClassName
  1212. 3D recessed
  1213. txClassName
  1214. txClassName
  1215. txclassname
  1216. 3DFrame Recessed
  1217. txClassName
  1218. txClassName
  1219. txClassName
  1220. 3Drecessed
  1221. txClassName
  1222. 3Drecessed
  1223. txclassname
  1224. 3DFrame
  1225. Copy Object
  1226. "copyInstructions" 
  1227. Zobj, pos
  1228. eatclicks()
  1229. "down"
  1230. objectFromPoint(
  1231. buttonDown
  1232. buttonUp
  1233. buttonDown
  1234. copyInstructions
  1235. buttonUp
  1236. eatclicks
  1237. copyInstructions
  1238. eatclicks
  1239. copyInstructions
  1240. of background
  1241. hotword
  1242. recordfield
  1243. Click me to copy an object
  1244. Generic:  Horizontal Sliders
  1245. just displays the slider 
  1246. thumbe 
  1247. being moved
  1248. message so 
  1249. OysBook gets 
  1250. txClassName 
  1251. sliderPosition 
  1252. %"0.00"
  1253. "sposition"
  1254. "sPosition"
  1255. buttonstilldown
  1256. buttonup
  1257. leavePage
  1258. buttonstilldown
  1259. txClassName
  1260. thumb
  1261. sliderPosition
  1262. sposition
  1263. buttonup
  1264. sPosition
  1265. leavePage
  1266. sPosition
  1267. +n'n'h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0
  1268. 1. Copy a slider to the clipboard.
  1269. 2. Go to your own ToolBook application and make sure you're at Author level.
  1270. 3. Paste the slider from the clipboard into your own application and  name  it "slider", or any name you wish.
  1271. To set the position of a slider:
  1272. In OpenScript, say:  
  1273. set sliderPosition of group "slider" to 1
  1274. The sliderPosition can be any value between 0 and 1.
  1275. To get the position of a slider:
  1276. In OpenScript, say:  
  1277. get sliderPosition of group "slider"
  1278. The position of the slider will be stored the OpenScript variable "it".med "slider".  
  1279. To get the position of a slider:
  1280.  get its SliderPosition.  
  1281. To set the position of a slider:   a slider:  is property can be  "vSliderThumb"  or 
  1282.  "hSliderThumb" , depending on the orientation of the slider.  The script for this page intercepts  buttonStillDown  and  buttonUp  messages to display the slider position.ending on the orientation of the slider.  The script for this page intercepts  buttonStillDown  and  buttonUp  messages to display the slider position.
  1283. "To give your slider a 
  1284. Fchoose the ""Group Properties"" 
  1285. Object"" 
  1286. buttonUp
  1287. buttonUp
  1288. To give your slider a name, select it and then choose the "Group Properties" menu item from the "Object" menu.
  1289. Sliders are grouped ToolBook objects that provide a way to control and display the position of multimedia elements.  
  1290. The topmost object in these groups is called a "thumb" object. You can read and set the position of the thumb. The SliderPosition is always expressed as a floating point number between 0 and 1.  When the thumb object of a horizontal slider is at the far left position, its parent's SliderPosition will be 0.  If the thumb object is at the far right, its parent's SliderPosition will be 1.
  1291. This page has a  script  which displays the sliderPosition in a text field.  If you try the same thing, make sure to  forward  the buttonStillDown message to the sysbook.ssage to the sysbook.
  1292. editScript "
  1293. buttonDown
  1294. buttonDown
  1295. editScript
  1296. to handle buttonstilldown
  1297. editScript "    
  1298. buttonDown
  1299. buttonDown
  1300. editScript
  1301.     forward
  1302. Horizontal Sliders
  1303. 0.6983471074380165
  1304. txClassName
  1305. Slider
  1306. follower
  1307. rectangle id 6 of page id 15
  1308. width
  1309. glide
  1310. roundedrectangle id 54 of page id 15
  1311. txClassName
  1312. hSliderThumb
  1313. Button
  1314. 0.130568356374808
  1315. txClassName
  1316. Slider
  1317. txClassName
  1318. hSliderThumb
  1319. glide
  1320. group id 101 of page id 15
  1321. width
  1322. follower
  1323. rectangle id 6 of page id 15
  1324. Button
  1325. 0.3248175182481752
  1326. txClassName
  1327. Slider
  1328. !txClassName
  1329. hSliderThumb
  1330. "glide
  1331. roundedrectangle id 76 of page id 15
  1332. L"B"width
  1333. ^"follower
  1334. rectangle id 6 of page id 15
  1335. Button
  1336. 0.7471264367816092
  1337. #txClassName
  1338. Slider
  1339. |#p#hilight
  1340. false
  1341. #width
  1342. #glide
  1343. button id 103 of page id 15
  1344. #txClassName
  1345. hSliderThumb
  1346. Button
  1347. \$B$s
  1348. 0.6089743589743589
  1349. p$txClassName
  1350. Slider
  1351. $txClassName
  1352. hSliderThumb
  1353. %glide
  1354. button id 107 of page id 15
  1355. :%0%width
  1356. J%hilight
  1357. false
  1358. Button
  1359. 0.346512661039538
  1360. %txClassName
  1361. Slider
  1362. X&N&width
  1363. &f&glide
  1364. line id 111 of page id 15
  1365. &txClassName
  1366. hSliderThumb
  1367. sposition
  1368. sposition
  1369. Slider Position:
  1370. Copy Object
  1371. "copyInstructions" 
  1372. Zobj, pos
  1373. eatclicks()
  1374. "down"
  1375. objectFromPoint(
  1376. buttonDown
  1377. buttonUp
  1378. buttonDown
  1379. copyInstructions
  1380. buttonUp
  1381. eatclicks
  1382. copyInstructions
  1383. eatclicks
  1384. copyInstructions
  1385. of background
  1386. hotword
  1387. recordfield
  1388. Click me to copy an object
  1389. Videodisc:  Event Editor
  1390. Widget Font Quick Reference
  1391. CD Audio:  Event Editor
  1392. 5J6z7
  1393. 9&E&E
  1394. noCopy
  1395. 1. Make sure you have a CD in your CD player and click the Driver On/Off switch to turn the CD device on.
  1396. 2. Click the Play button to start playing the CD.
  1397. 3. Find the spot on the CD where you want to begin making the clip by clicking the Scan, Skip and Play buttons.
  1398. 4. Click the Start Clip button while the CD is playing to note the beginning of the clip.
  1399. 5. Click the End Clip button to note the end of the clip.  You can edit the text of the Start Clip and End Clip text fields.
  1400. 6. Click the Restart Clip and Play Clip buttons to review your CD clip.
  1401. 7. When you're satisfied with your clip, click the make the CD clip button button.
  1402. 8. Go to your own ToolBook application and make sure you're at Author level.
  1403. 9. Paste the button from the clipboard into your own application.
  1404. 10. Switch to Reader level.
  1405. 11. Click the button to play your CD clip..
  1406. The controls on this page let you select a clip from a CD and create a button that plays that clip.  
  1407. The Driver On/Off widget  opens  and 
  1408.  closes  the device and initializes the disc.  
  1409. The Track and Position fields are updated by an  idle  handler which queries the status of the CD audio driver.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.    want them to update correctly.  
  1410. editScript "
  1411. tbkMCIchk(""
  1412. cdAudio shareable""", 
  1413. "Driver switch"
  1414. buttonDown
  1415. buttonDown
  1416. editScript
  1417. get tbkMCIchk("open cdAudio shareable"
  1418. Driver switch
  1419. editScript "
  1420. tbkmci(""close cdAudio""", 
  1421. "Driver switch"
  1422. buttonDown
  1423. buttonDown
  1424. editScript
  1425. get tbkmci("close cdAudio"
  1426. Driver switch
  1427. editScript "
  1428. buttondown
  1429. buttondown
  1430. editScript
  1431. to handle idle
  1432. CD Audio Event Editorror
  1433. tbkMCI("play d:\mm\wave.
  1434. 200 wait","")
  1435. buttonUp
  1436. buttonUp
  1437. play d:\mm\wave.wav from 100 to 200 wait
  1438. tbkMCI
  1439. fileName
  1440. d:\mm\wave.wav
  1441. Button
  1442. Start Position
  1443. Start Clip: on:  n  
  1444. End Position
  1445. End Clip: on: tion  
  1446. Play Clip
  1447. Restart Clipck 
  1448. Scan rt 
  1449. Skip rt 
  1450. Skip rt 
  1451. Play rt 
  1452. Scan rt 
  1453. Driver On/Off
  1454. PositionPosition
  1455. Current Track: 
  1456. Tracks on Disc  
  1457. Tracks
  1458. Track
  1459. Position
  1460. -- The 
  1461. used only 
  1462. you want 
  1463. -updating 
  1464. fits own timer.
  1465. -- To turn the 
  1466.  on, 
  1467. running 
  1468. "on" 
  1469. tbkTimer("
  1470. V shareable alias tmCDPos",
  1471.  type periodic","")
  1472.  1000","")
  1473. aplay 
  1474. vclose 
  1475. multimedia
  1476. ownerPgBkgnd 
  1477. tbkMCI("sysinfo cdaudio use count","")
  1478. (isNumber(
  1479. tbkCDAudio("status cdAudio 
  1480. ","")
  1481. Tn-2 
  1482. multimedia
  1483. running
  1484. running
  1485. open timer shareable alias tmCDPos
  1486. tbkTimer
  1487. set tmCDPos type periodic
  1488. tbkTimer
  1489. set tmCDPos period 1000
  1490. tbkTimer
  1491. play tmCDPos
  1492. tbkTimer
  1493. close tmCDPos
  1494. tbkTimer
  1495. multimedia
  1496. ownerPgBkgnd
  1497. running
  1498. sysinfo cdaudio use count
  1499. tbkMCI
  1500. isNumber
  1501. status cdAudio position
  1502. tbkCDAudio
  1503. Pause t 
  1504. Restart
  1505. Track 
  1506. Stop rt 
  1507. Scan Reverse
  1508. 4s_start
  1509. checkDevice TRUE
  1510.     --beginning 
  1511. millisecFromMSF(tbkMCIchk("status cdAudio 
  1512. track 1","",1,1)) + 1000
  1513. ms","",1)
  1514. ","",1)
  1515.  + 5000
  1516. " && 
  1517. - 5000,"",1)
  1518. " && 
  1519. ,"",1)
  1520. msf","",1)
  1521. Play 
  1522. ","",1,1)
  1523. uttonDown
  1524. buttonStillDown
  1525. buttonDown
  1526. buttonUp
  1527. buttonDown
  1528. checkDevice
  1529. status cdAudio position track 1
  1530. tbkMCIchk
  1531. millisecFromMSF
  1532. buttonStillDown
  1533. s_start
  1534. buttonStillDown
  1535. set cdAudio time format ms
  1536. tbkMCIchk
  1537. status cdAudio position
  1538. tbkMCIchk
  1539. seek cdAudio to
  1540. tbkMCIchk
  1541. seek cdAudio to
  1542. tbkMCIchk
  1543. set cdAudio time format msf
  1544. tbkMCIchk
  1545. s_start
  1546. buttonUp
  1547. Play cdAudio
  1548. tbkMCIchk
  1549. Skip Reverse
  1550. ZmaxTracks, 
  1551. checkDevice TRUE
  1552. tbkMCIchk("status cdAudio 
  1553. tracks","",1,1)
  1554. 0Status 
  1555. 'current 
  1556. &","",1)
  1557. w <> 
  1558. ~ > 1
  1559. tmsf","",1)
  1560. play 
  1561. " && (
  1562.  - 1) & ":00:00:00","",1)
  1563. buttonDown
  1564. buttonDown
  1565. checkDevice
  1566. status cdAudio number of tracks
  1567. tbkMCIchk
  1568. Status cdAudio current track
  1569. tbkMCIchk
  1570. set cdAudio time format tmsf
  1571. tbkMCIchk
  1572. play cdAudio from
  1573. :00:00:00
  1574. tbkMCIchk
  1575. set cdAudio time format msf
  1576. tbkMCIchk
  1577. maxTracks
  1578. Track
  1579. Restart Track
  1580. Ztrack
  1581. checkDevice TRUE
  1582. tbkMCIchk("Status cdAudio current 
  1583. @","",1,1)
  1584. tmsf","",1)
  1585. Fplay 
  1586. " && 
  1587. v & ":00:00:00","",1)
  1588. buttonDown
  1589. buttonDown
  1590. checkDevice
  1591. Status cdAudio current track
  1592. tbkMCIchk
  1593. set cdAudio time format tmsf
  1594. tbkMCIchk
  1595. play cdAudio from
  1596. :00:00:00
  1597. tbkMCIchk
  1598. set cdAudio time format msf
  1599. tbkMCIchk
  1600. track
  1601. Pause
  1602. checkDevice TRUE
  1603. tbkMCIchk("Pause cdAudio","",1)
  1604. buttonDown
  1605. buttonDown
  1606. checkDevice
  1607. Pause cdAudio
  1608. tbkMCIchk
  1609. checkDevice TRUE
  1610. tbkMCIchk("Stop cdAudio","",1,1)
  1611. ms","",1)
  1612. 8status 
  1613. track 1","",1) + 1000
  1614. _seek 
  1615. " && 
  1616. ,"",1)
  1617. msf","",1)
  1618. buttonDown
  1619. buttonDown
  1620. checkDevice
  1621. Stop cdAudio
  1622. tbkMCIchk
  1623. set cdAudio time format ms
  1624. tbkMCIchk
  1625. status cdAudio position track 1
  1626. tbkMCIchk
  1627. seek cdAudio to
  1628. tbkMCIchk
  1629. set cdAudio time format msf
  1630. tbkMCIchk
  1631. Skip Forward
  1632. ZmaxTracks, 
  1633. checkDevice TRUE
  1634. tbkMCIchk("status cdAudio 
  1635. tracks","",1,1)
  1636. 0Status 
  1637. 'current 
  1638. &","",1)
  1639. w <> 
  1640. tmsf","",1)
  1641. play 
  1642. " && (
  1643.  + 1) & ":00:00:00","",1)
  1644. buttonDown
  1645. buttonDown
  1646. checkDevice
  1647. status cdAudio number of tracks
  1648. tbkMCIchk
  1649. Status cdAudio current track
  1650. tbkMCIchk
  1651. set cdAudio time format tmsf
  1652. tbkMCIchk
  1653. play cdAudio from
  1654. :00:00:00
  1655. tbkMCIchk
  1656. set cdAudio time format msf
  1657. tbkMCIchk
  1658. maxTracks
  1659. Track
  1660. checkDevice TRUE
  1661. tbkMCIchk("Play cdAudio","",1,1)
  1662. buttonDown
  1663. buttonDown
  1664. checkDevice
  1665. Play cdAudio
  1666. tbkMCIchk
  1667. Scan Forward
  1668. 4s_end
  1669. checkDevice TRUE
  1670. millisecFromMSF(tbkMCIchk("status cdAudio length","",1,1))
  1671. ms","",1)
  1672. ","",1)
  1673.  - 5000
  1674. zeek 
  1675. " && 
  1676. + 5000,"",1)
  1677. " && 
  1678. ,"",1)
  1679. msf","",1)
  1680. Play 
  1681. ","",1,1)
  1682. uttonDown
  1683. buttonStillDown
  1684. buttonDown
  1685. buttonUp
  1686. buttonDown
  1687. checkDevice
  1688. status cdAudio length
  1689. tbkMCIchk
  1690. millisecFromMSF
  1691. buttonStillDown
  1692. s_end
  1693. buttonStillDown
  1694. set cdAudio time format ms
  1695. tbkMCIchk
  1696. status cdAudio position
  1697. tbkMCIchk
  1698. seek cdAudio to
  1699. tbkMCIchk
  1700. seek cdAudio to
  1701. tbkMCIchk
  1702. set cdAudio time format msf
  1703. tbkMCIchk
  1704. s_end
  1705. buttonUp
  1706. Play cdAudio
  1707. tbkMCIchk
  1708. Restart Clip
  1709. "Start Position" 
  1710. "Please 
  1711. a clip 
  1712. tbkMCIchk("seek cdAudio 
  1713. " && 
  1714. Z,"",1)
  1715. buttonDown
  1716. buttonDown
  1717. Start Position
  1718. Please select a clip first.
  1719. seek cdAudio to
  1720. Start Position
  1721. tbkMCIchk
  1722. Play Clip
  1723. "Start Position" 
  1724. "Please 
  1725. a clip 
  1726. tbkMCIchk("play cdAudio 
  1727. " && 
  1728. [&& \
  1729. " && 
  1730. "End 
  1731. n,"",1)
  1732. yieldApp()
  1733. buttonDown
  1734. buttonDown
  1735. Start Position
  1736. Please select a clip first.
  1737. play cdAudio from
  1738. Start Position
  1739. End Position
  1740. tbkMCIchk
  1741. yieldApp
  1742. Start Clip
  1743. tbkMCIchk("status cdAudio 
  1744. ","",1,1)
  1745. "Start Position"
  1746. buttonDown
  1747. buttonDown
  1748. status cdAudio position
  1749. tbkMCIchk
  1750. Start Position
  1751. Start Clip
  1752. End Clip
  1753. tbkMCIchk("status cdAudio 
  1754. ","",1,1)
  1755. "End Position"
  1756. buttonDown
  1757. buttonDown
  1758. status cdAudio position
  1759. tbkMCIchk
  1760. End Position
  1761. End Clip
  1762. Make A CD Audio Clip Button
  1763. Click me to make the CD clip button
  1764. Driver switch
  1765. 8txclassname
  1766. vSwitchHandle
  1767. 00:05:02
  1768. ofileName
  1769. rightButtonup
  1770. B's bitmap 
  1771. fa popup 
  1772. tbkBitmapchk("
  1773. " && 
  1774. d && "alias dibFile style child 
  1775. " && sysClientHandle, 1, 1)
  1776. " && 
  1777. ox & "," & 
  1778. oy,1)
  1779. kate 
  1780. translating 
  1781. emessages 
  1782. bmpHandle 
  1783. ("status 
  1784.     translatewindowmessage 
  1785. bmpButtonup 
  1786. --dismiss 
  1787. they click 
  1788. BMPbuttonUp 
  1789.     untranslateAllWindowMessages 
  1790. ("close 
  1791. OpenDlg(".", "*.*", "Choose a 
  1792. (.dib 
  1793.  extensions)", "
  1794. ox & "," & 
  1795. "0,0"
  1796. ("Would you like 
  1797. specify 
  1798. e? If so, please enter 2 numeric coordinates." 
  1799. ) <> 2
  1800. "Invalid 
  1801. x"0" 
  1802. xisNumber(
  1803. "Coordinate 
  1804. z" && i && "
  1805. tonUp
  1806. BMPbuttonUp
  1807. buttonUp
  1808. rightButtonUp
  1809. buttonUp
  1810. fileName
  1811. prightButtonup
  1812. fileName
  1813. alias dibFile style child parent
  1814. tbkBitmapchk
  1815. window dibFile position
  1816. tbkBitmapchk
  1817. window dibFile state show
  1818. tbkBitmapchk
  1819. status dibFile window
  1820. tbkBitmap
  1821. bmpButtonup
  1822. bmpHandle
  1823. BMPbuttonUp
  1824. close dibFile
  1825. tbkBitmap
  1826. bmpHandle
  1827. rightButtonUp
  1828. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  1829. Choose Bitmap File
  1830. OpenDlg
  1831. fileName
  1832. fileName
  1833. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  1834. cancel
  1835. Invalid number of coordinates.
  1836. isNumber
  1837. Coordinate number
  1838. is not a number.
  1839. Wave Audio:  Sound and Animation
  1840. MIDI sequencer:  Simple Controls
  1841. Bitmap Graphics:  Bitmap Buttons
  1842. CDAudio: Controls (1)
  1843. Wave Audio:  Wave File Buttons
  1844. Wave Audio:  Sound and Animation
  1845. 1. Click the Roll the Wheel button to see animation during wave audio.
  1846. Notes:
  1847. Wave audio files can be be played during animation sequences without interruption by using the  yieldApp( )  function from TBKWIN.DLL.  The yieldApp( ) function is linked in the  enterBook  handler in the sysBook. The  hold  parameter for the play command prevents a lapse in the animation when the sound file finishes playing.
  1848. The picture of the wheel is actually a special character from the Widgets font.  There are 4 textlines in the field, each with a different Widget font character.  The wheel rolls by setting the  scroll  property of the text field while moving it to the right.the text field while moving it to the right.y of the text field while moving it to the right.
  1849. editScript "
  1850. yieldApp()", 
  1851. B"Roll The Wheel"
  1852. buttonDown
  1853. buttonDown
  1854. editScript
  1855. get yieldApp()
  1856. Roll The Wheel
  1857. editScript "yieldApp()", tbkmmsbk()
  1858. buttonDown
  1859. buttonDown
  1860. editScript
  1861. yieldApp()
  1862. tbkmmsbk
  1863. editScript " hold", 
  1864. B"Roll The Wheel"
  1865. buttonDown
  1866. buttonDown
  1867. editScript
  1868.  hold
  1869. Roll The Wheel
  1870. editScript "
  1871. B"Roll The Wheel"
  1872. buttonDown
  1873. buttonDown
  1874. editScript
  1875. set scroll
  1876. Roll The Wheel
  1877. These objects demonstrate synchronizing wave audio with font animation.  
  1878. Please examine the  script  of the Roll the Wheel button.Wheel button..
  1879. B"Roll the Wheel"
  1880. buttonDown
  1881. buttonDown
  1882. Roll the Wheel
  1883. Sound and Animation and Anima
  1884. wheel
  1885. Roll the Wheel
  1886. 4s_path
  1887. Zi, j
  1888. the wave file
  1889. tbkMCIchk("
  1890. " && 
  1891. ? & "train.
  1892. ( alias waveFile","",1,1)
  1893.     --play 
  1894. V"hold" parameter
  1895.     --also specifying 
  1896. notification 
  1897.     --use yieldApp() 
  1898. sound 
  1899. playing
  1900.     --loop through 
  1901. font animation
  1902.             --animate 
  1903. idget 
  1904. moving 
  1905. "wheel" 
  1906. H45,0
  1907.             --
  1908. o avoid gaps 
  1909. audio
  1910.     --reset 
  1911. H-3600,0
  1912. tbkmmnotify
  1913. tbkmci("close 
  1914. buttonDown
  1915. tbkmmnotify
  1916. buttonDown
  1917. train.wav alias waveFile
  1918. tbkMCIchk
  1919. play waveFile from 0 hold
  1920. tbkMCIchk
  1921. yieldApp
  1922. wheel
  1923. wheel
  1924. yieldApp
  1925. wheel
  1926. j:to1
  1927. s_path
  1928. tbkmmnotify
  1929. close waveFile
  1930. tbkmci
  1931. fileName
  1932. D:\MM\WIDGET\bells.wav
  1933. Roll the Wheel
  1934. MIDI sequencer:  Status
  1935. M\D|D|u
  1936. System
  1937. M\D|D|u
  1938. aboutdlginit
  1939. M\D|D|-
  1940. bookMarks
  1941. Wave Audio:  Wave File Buttons,Map
  1942. gD|D|}
  1943. The Mini Widgets Book
  1944. C:\TOOLBOOK\tbkmm.sbk
  1945. :PRINTLAYOUT
  1946. gD|D|}
  1947. system
  1948. G\D|D|
  1949. TBKWidgets
  1950. gD|D|}
  1951. \D|D|
  1952. pageList
  1953. \D|D|
  1954. TBKWidgets
  1955. \D|D|
  1956. TBKWidgets
  1957. u\zp 
  1958. system
  1959. gD|D|}
  1960. gD|D|}
  1961. KWidgets
  1962. \D|D|
  1963. gD|D|}
  1964. TBKWidgets
  1965. gD|D|}
  1966. gD|D|}
  1967. sysBookPath
  1968. D:\MM\tbkmm.sbk
  1969. aaaaaaaaaa
  1970. tbkmm.sbk
  1971. ltimedia Widgets
  1972. Wave Audio:  Simple Controls,Map
  1973. s Widget Book
  1974. Wave Audio:  Wave File Buttons,Map
  1975. dget Book
  1976. poration.  All Rights Reserved
  1977. Shabbir Dahod
  1978. Michelle DeWilliam
  1979. Jim Gallant
  1980. Mike Miller
  1981. Claude Ostyn
  1982. Craig Schwandt
  1983. ,b14,TRUE
  1984. aboutdlgbox
  1985. get Font - Quick Reference
  1986. Using the Widget font in apps
  1987. Optimizing Slider Performance
  1988. Use this page for your own notes
  1989. KWidgets
  1990. \D|D|
  1991. ,h11,
  1992. ,s12,Multimedia Widgets
  1993. ,s13,Copyright 1991 Asymetrix Corporation.  All rights reserved.
  1994. ,b14,TRUE
  1995. 524480,4,30,20,125,86,,,About Multimedia Widgets,8,Helv,,12.91,4.76,18.29,19.69,11,1342177283,130,toolbook,0,,40.91,10.79,65.37,9.52,12,1342177280,130,Multimedia Widgets,0,,5.45,28.88,115.73,21.58,13,1342177281,130,Copyright 1991 Asymetrix Corporation.  All rights reserved.,0,,37.18,53.01,44.80,14.07,14,1342242817,128,OK,0
  1996. rol Panels
  1997. Videodisc: Controls
  1998. Videodisc: Status
  1999. WaveAudio: Controls
  2000. WaveAudio: Events
  2001. WaveAudio: Recording Controls
  2002. WaveAudio: Status
  2003. About this Widget Book
  2004. Setting up MMWidget.tbk
  2005. Widget Font - Quick Reference
  2006. Using the Widget font in apps
  2007. Optimizing Slider Performance
  2008. Use this page for your own notes
  2009. 524480,4,30,20,131,152,,,About Multimedia Widgets,8,Helv,,22.25,4.72,18.29,19.69,11,1342177283,130,toolbook,0,,46.51,10.75,69.07,12.06,12,1342177280,130,Multimedia Widgets,0,,9.18,28.84,110.13,80.41,13,1342177281,130,Copyright 1991 Asymetrix
  2010. Corporation.  All Rights Reserved
  2011. Shabbir Dahod
  2012. Michelle DeWilliam
  2013. Jim Gallant
  2014. Mike Miller
  2015. Claude Ostyn
  2016. Craig Schwandt,0,,39.05,121.31,50.86,14.32,14,1342242817,128,OK,0
  2017. ,h11,
  2018. ,s12,Multimedia Widgets
  2019. ,s13,Copyright 1991 Asymetrix
  2020. Corporation.  All Rights Reserved.
  2021. Shabbir Dahod
  2022. Michelle DeWilliam
  2023. Jim Gallant
  2024. Mike Miller
  2025. Claude Ostyn
  2026. Craig Schwandt
  2027. ,b14,TRUE
  2028. ZstartPos, endPos
  2029. "Start Position" 
  2030. "Please 
  2031. a clip 
  2032. "End 
  2033. setDefaultButtonStyle
  2034. 2000,750
  2035. "CD Audio Clip"
  2036. }" & CRLF & TAB & \
  2037. ZoldTimeFormat" & 
  2038. tbkMCI(""
  2039. cdAudio shareable"",
  2040. )" & 
  2041. " && \
  2042. 9status 
  2043. )" & 
  2044. msf"",
  2045. )" & 
  2046. zplay 
  2047. " && 
  2048.  && \
  2049. " && 
  2050.  && "wait"",
  2051. )" & 
  2052. "" && 
  2053. )" & 
  2054. close 
  2055. )" & 
  2056. Bthat plays a CD 
  2057. " && 
  2058.  && \
  2059. " && 
  2060.  && "has been copied 
  2061. the clipboard."
  2062. runBook 
  2063. buttonDown
  2064. buttonDown
  2065. Start Position
  2066. Please select a clip first.
  2067. Start Position
  2068. End Position
  2069. setDefaultButtonStyle
  2070. CD Audio Clip
  2071. to handle buttonUp
  2072. local oldTimeFormat
  2073. get tbkMCI("open cdAudio shareable","")
  2074. set oldTimeFormat to
  2075. tbkMCI("status cdAudio time format","")
  2076. get tbkMCI("set cdAudio time format msf","")
  2077. get tbkMCI("play cdAudio from
  2078. wait","")
  2079. get tbkMCI("set cdAudio time format to" && oldTimeFormat,"")
  2080. get tbkMCI("close cdAudio","")
  2081. A button that plays a CD from
  2082. has been copied to the clipboard.
  2083. JrunBook
  2084. startPos
  2085. endPos
  2086. owaveFileName
  2087. setWaveFile
  2088. oDIBFileName
  2089. setDIBFile
  2090.     --close 
  2091. b file 
  2092. already 
  2093. tbkMCI("status wavefile mode","") 
  2094. c"play"
  2095. ","")
  2096. B's bitmap 
  2097. fa popup 
  2098. tbkBitmapchk("
  2099. " && 
  2100. oDIBfileName && "alias dibFile style child 
  2101. " && sysClientHandle, 1, 1)
  2102. 6ate 
  2103. translating 
  2104. emessages 
  2105. bmpHandle 
  2106.     translatewindowmessage 
  2107. bmpButtonup 
  2108. tbkMCIchk("
  2109. " && 
  2110.  && "
  2111. ","",1,1)
  2112.  wait","",1)
  2113. ","",1)
  2114. --prompt 
  2115. OpenDlg(".", "*.wav", "Choose a 
  2116. B.", "
  2117. ndib", "
  2118. .bmp extensions)", "
  2119. --dismiss 
  2120. they click 
  2121. BMPbuttonUp 
  2122.     untranslateAllWindowMessages 
  2123. ghtButtonUp
  2124. buttonDown
  2125. setWaveFile
  2126. setDIBFile
  2127. rightButtonUp
  2128. BMPbuttonUp
  2129. buttonDown
  2130. waveFileName
  2131. setWaveFile
  2132. DIBFileName
  2133. setDIBFile
  2134. status wavefile mode
  2135. tbkMCI
  2136. close waveFile
  2137. tbkMCI
  2138. DIBfileName
  2139. alias dibFile style child parent
  2140. tbkBitmapchk
  2141. window dibFile state show
  2142. tbkBitmapchk
  2143. status dibFile window
  2144. tbkBitmap
  2145. bmpButtonup
  2146. waveFileName
  2147. alias waveFile
  2148. tbkMCIchk
  2149. play waveFile wait
  2150. tbkMCIchk
  2151. close waveFile
  2152. tbkMCIchk
  2153. bmpHandle
  2154. rightButtonUp
  2155. setWaveFile
  2156. setDIBFile
  2157. setWaveFile
  2158. *.wav
  2159. Choose a wave file for this button.
  2160. Choose Wave File
  2161. OpenDlg
  2162. fileName
  2163. waveFileName
  2164. setDIBFile
  2165. *.dib
  2166. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  2167. Choose Bitmap File
  2168. OpenDlg
  2169. DIBFileName
  2170. DIBFileName
  2171. BMPbuttonUp
  2172. close dibFile
  2173. tbkBitmap
  2174. bmpHandle
  2175. widgets
  2176. setScroll 
  2177. "Description"
  2178. "Dependencies"
  2179. rf > 0 
  2180. rf = 0 
  2181. enterPage
  2182. setScroll
  2183. enterPage
  2184. setScroll
  2185. Description
  2186. setScroll
  2187. Dependencies
  2188. setScroll
  2189. scrolling
  2190. scrolling
  2191. What these objects do:
  2192. Page Title
  2193. Description
  2194. Dependencies
  2195. copyInstructions
  2196. Click an object to copy it to the clipboard.
  2197. Instructions:
  2198. buttonUp
  2199. buttonUp
  2200. defStroke
  2201. 0,0,0
  2202. txClassName
  2203. button
  2204. Previous
  2205. buttonUp
  2206. buttonUp
  2207. defStroke
  2208. 0,0,0
  2209.     txClassName
  2210. button
  2211. buttonUp
  2212. buttonUp
  2213.     defStroke
  2214. 0,0,0
  2215.     txClassName
  2216. button
  2217. "map"
  2218. buttonUp
  2219. buttonUp
  2220. txClassName
  2221. button
  2222. defStroke
  2223. 0,0,0
  2224. Search
  2225. buttonUp
  2226. buttonUp
  2227. search
  2228. txClassName
  2229. button
  2230. defStroke
  2231. 0,0,0
  2232. Search...
  2233. widgets
  2234. reference
  2235. Page Title
  2236. descr1
  2237. descr2
  2238. descr3
  2239. explain
  2240. buttonUp
  2241. buttonUp
  2242. txClassName
  2243. button
  2244. defStroke
  2245. 0,0,0
  2246. Previous
  2247. buttonUp
  2248. buttonUp
  2249. txClassName
  2250. button
  2251. defStroke
  2252. 0,0,0
  2253. buttonUp
  2254. buttonUp
  2255. txClassName
  2256. button
  2257. defStroke
  2258. 0,0,0
  2259. "map"
  2260. buttonUp
  2261. buttonUp
  2262. defStroke
  2263. 0,0,0
  2264. txClassName
  2265. button
  2266. Search
  2267. buttonUp
  2268. buttonUp
  2269. search
  2270. defStroke
  2271. 0,0,0
  2272.     txClassName
  2273. button
  2274. Search...
  2275. reference
  2276. Multimedia, MCI and Toolbook
  2277. Multimedia, MCI and ToolBook
  2278. Multimedia ToolBook allows you to use all the devices shown on the map page.   These Widgets rely on Windows' Media Control Interface (MCI).
  2279. MCI is a string interface that allows you to make standard function calls to a various devices without having to worry about the type or make of the device.  This standard protocol simplifies multimedia development.ment......................owing applications can run on a wider range of hardware.           
  2280. Multimedia Devices
  2281. Multimedia devices are either simple or complex.  
  2282. Simple devices include videodisc and CD players.  No data file name is associated with them. To open and  play  them, you specify the device name in the function call.
  2283. Complex devices include wave audio, MIDI and animation players. To open and  play  them, you specify a media file name in the function call. These include  .wav ,  .mid ,  .mmm ,  .fli  and  .flc  files.
  2284. using them..
  2285. For best performance, close multimedia data files after using them.
  2286. "For example:" & CRLF & 
  2287. tbkMCI(""
  2288. videodisc shareable"",
  2289. )" & 
  2290. 0play 
  2291. buttonUp
  2292. buttonUp
  2293. For example:
  2294. get tbkMCI("open videodisc shareable","")
  2295. get tbkMCI("play videodisc","")
  2296. "For example:" & CRLF & 
  2297. tbkMCI(""
  2298. water.wav alias 
  2299. )" & 
  2300. /play 
  2301. buttonUp
  2302. buttonUp
  2303. For example:
  2304. get tbkMCI("open water.wav alias water","")
  2305. get tbkMCI("play water","")
  2306. "Wave audio files use a "".wav"" extension."
  2307. buttonUp
  2308. buttonUp
  2309. Wave audio files use a ".wav" extension.
  2310. "MIDI files use a "".
  2311. g"" extension."
  2312. buttonUp
  2313. buttonUp
  2314. MIDI files use a ".mid" extension.
  2315. "Macromind Director animation files use a "".mmm"" extension."
  2316. buttonUp
  2317. buttonUp
  2318. Macromind Director animation files use a ".mmm" extension.
  2319. "Autodesk Animator animation files use "".fli"" 
  2320. "".flc"" extensions."
  2321. buttonUp
  2322. buttonUp
  2323. Autodesk Animator animation files use ".fli" and ".flc" extensions.
  2324. "Autodesk Animator animation files use "".fli"" 
  2325. "".flc"" extensions."
  2326. buttonUp
  2327. buttonUp
  2328. Autodesk Animator animation files use ".fli" and ".flc" extensions.
  2329. Devices and media files can be opened with an  alias .  This allows you to refer to a device or a file name with a name that's easier to type or is meaningful.
  2330. Make sure to close multimedia data files after using them. You can open media files in an enterPage handler for fast performance.
  2331. Simple devices like CD and videodisc can be opened with the  shareable  parameter.  This allows multiple applications to use the same device....
  2332. editScript "alias waveFile", 
  2333. B"Play And Wait" 
  2334. "Wave Audio:
  2335. ( Buttons"
  2336. buttonUp
  2337. buttonUp
  2338. editScript
  2339. alias waveFile
  2340. Play And Wait
  2341. Wave Audio:  Wave File Buttons
  2342. editScript " shareable""", 
  2343. "Driver switch" 
  2344. "CD Audio:
  2345. Event Editor"
  2346. buttonDown
  2347. buttonDown
  2348. editScript
  2349.  shareable"
  2350. Driver switch
  2351. CD Audio:  Event Editor
  2352. Wave Audio:  Sound and Bitmaps
  2353. 1. Copy one of these buttons to the clipboard.
  2354. 2. Go to your own ToolBook application and make sure you're at Author level.
  2355. 3. Paste the button from the clipboard into your own application.
  2356. 4. Switch to Reader level.
  2357. 5. Click the button you pasted with your RIGHT mouse button
  2358. 6. You'll be prompted for a wave audio file name. Choose the name of a wave audio file and click OK.
  2359. 7. You'll also be prompted for a bitmap file name. Choose the name of a bitmap file and click OK.
  2360. 8. Click the button with your LEFT mouse button to show the bitmap and play the wave audio file. 
  2361. 9. Click the bitmap to close it if you used the Show and Play button.
  2362. 10. To assign a different wave audio file or bitmap to the button, RIGHT click it again.
  2363. These buttons show bitmaps and play wave audio files.
  2364. The Show and Play button opens and shows a bitmap in a child window, then opens, plays and closes a wave file.  You must click the bitmap to close the bitmap.
  2365. The Show, Play and Close button opens and shows a bitmap in a child window, then opens and plays a wave audio file.  Both the wave audio file and the bitmap are closed when the wave audio file finishes playing.bkmmNotify handler closes the wave file.
  2366. Sound and Bitmaps
  2367. Show and Play
  2368. Show and Play
  2369. Show, Play and Close
  2370. Show, Play and Close
  2371. Copy Object
  2372. "copyInstructions" 
  2373. Zobj, pos
  2374. eatclicks()
  2375. "down"
  2376. objectFromPoint(
  2377. buttonDown
  2378. buttonUp
  2379. buttonDown
  2380. copyInstructions
  2381. buttonUp
  2382. eatclicks
  2383. copyInstructions
  2384. eatclicks
  2385. copyInstructions
  2386. of background
  2387. hotword
  2388. recordfield
  2389. Click me to copy a button
  2390. FALSE
  2391. runBook
  2392.  ToolBook
  2393. x"OK"
  2394. "The 
  2395. {you clicked has been copied 
  2396. the clipboard."
  2397. " Would 
  2398. 9like 
  2399. another instance 
  2400.  now?" 
  2401. f"&New 
  2402. "&Existing 
  2403. "&Cancel"
  2404. "toolbook.exe"
  2405.             setRemote "
  2406. "12,104,340,401" 
  2407. "7,174" 
  2408. OpenDlg(".", "*.tbk", "Choose your 
  2409.  .", "
  2410.  Application")
  2411. -- MMWIDGET.TBK
  2412.  Script
  2413. -- Contains routines specific 
  2414. also 
  2415. -- support 
  2416. ,level modification 
  2417. pasting 
  2418. widgets
  2419. 4s_Path
  2420. c"Text" 
  2421. "Save" 
  2422. "SaveAs" 
  2423. "Import" 
  2424. "Export" 
  2425. "PrintReport" 
  2426. "Tutorial" 
  2427. "Keyboard" 
  2428. "Commands" 
  2429. "UsingHelp" 
  2430. "Glossary" 
  2431. "Index" 
  2432. "&Multimedia" 
  2433. "About This &
  2434. ..." alias "aboutWidgets" 
  2435.     linkDLL "tbkdlg.dll"
  2436.         STRING    dialog(
  2437. Xkernel
  2438.         WORD    GlobalAlloc(
  2439. , DWORD)
  2440.         POINTER    GlobalLockPointer_ = 
  2441. @Unlock(
  2442. NFree(
  2443. Xuser
  2444. bSetTimer(
  2445. Y        KillTimer(
  2446. n        bringwindowtotop( 
  2447. getFocus()
  2448. getParent( 
  2449. getClassName( 
  2450. LONG    sendMessage( 
  2451.         postmessage(
  2452.         INT        setwindowtext(
  2453. PeekMsg_ = PeekMessage(
  2454. "tbkwin.
  2455. tbkmmsbk
  2456. sysBookPath 
  2457. b", "Please find 
  2458. }.", "
  2459.  path.")
  2460. 4s_oldSearch
  2461. ZoldPage, prompt
  2462. selectedTextState <> 
  2463. "Cannot 
  2464. """ & 
  2465.  & """.
  2466. beginning 
  2467. f"&Yes" 
  2468. "&No"
  2469. """ & 
  2470.  & """."
  2471. editScript txt, obj
  2472. 4scriptText, phase, bk
  2473. settimer(sysclienthandle,1,100,0)
  2474. "Unable 
  2475. killtimer(
  2476. Zhwnd, class
  2477. getfocus()
  2478. + <> 0
  2479. className(
  2480. "BufEdit"
  2481. getparent(
  2482. ~), 273, 6512, 0)
  2483. ), 273, 2, 0)
  2484. )), 273, 6514, 0)
  2485. classname 
  2486. getclassname(
  2487. Zinit, retValue
  2488. aboutDlgInit 
  2489. aboutDlgBox 
  2490. setDefaultButtonStyle
  2491. sysButtonStyle    
  2492. "pushButton"
  2493. sysfontFace        
  2494. "Helv"
  2495. sysfontSize        
  2496. sysfontStyle    
  2497. sysTransParent    
  2498. "0,75.3125,0"
  2499. isPosInt num
  2500. sysDecimal 
  2501. = < 1
  2502. -- Function:
  2503. Eatclicks
  2504. -- Purpose:
  2505.  pending keyboard 
  2506. mouse messages
  2507. -- Parameters: 
  2508. -- Returns:
  2509. positive 
  2510. successful
  2511. eatclicks onOrOff
  2512. ZwFlags, dwBytes, cnt, hMsg, lpMsg
  2513.     -- Link 
  2514. Windows functions 
  2515. allocate a block 
  2516. memory only
  2517. xdone already
  2518.      flags
  2519.  32     -- 
  2520. MSG data structure, 
  2521. froom 
  2522. spare
  2523.  = 0 
  2524. GlobalFree(
  2525.     -- We now have a buffer 
  2526. we can call
  2527.     -- windows 
  2528.  we don't want
  2529.     -- Mouse 
  2530. , 512, 521, 1) <> 0
  2531. , 256, 264, 1) <> 0
  2532.     -- Menu Accelerators
  2533. , 111, 112, 1) <> 0
  2534. GlobalUnlock(
  2535. -- EatClicks
  2536. 4sFromAppSampler
  2537. 8"appsamp.
  2538. leavePage
  2539. enterBook
  2540. author
  2541. search
  2542. leaveBook
  2543. editScript
  2544. runBook
  2545. aboutWidgets
  2546. enterpage
  2547. setDefaultButtonStyle
  2548. classname
  2549. tbkmmsbk
  2550. isPosInt
  2551. eatclicks
  2552. button
  2553. group
  2554. JrunBook
  2555. runBook
  2556. name of this book
  2557. The object you clicked has been copied to the clipboard.
  2558.  Would you like to run another instance of ToolBook now?
  2559. &New Book
  2560. &Existing Book
  2561. &Cancel
  2562. New Book
  2563. toolbook.exe
  2564. bounds of mainWindow
  2565. 12,104,340,401
  2566. toolbook
  2567. position of toolpalette
  2568. 7,174
  2569. toolbook
  2570. Existing Book
  2571. *.tbk
  2572. Choose your ToolBook application.
  2573. Choose ToolBook Application
  2574. OpenDlg
  2575. toolbook.exe
  2576. ToolBook
  2577. enterBook
  2578. SaveAs
  2579. Import
  2580. Export
  2581. PrintReport
  2582. newPage
  2583. Tutorial
  2584. Keyboard
  2585. Commands
  2586. UsingHelp
  2587. Glossary
  2588. Index
  2589. &Multimedia
  2590. About This &Book...
  2591. aboutWidgets
  2592. sizeToPage
  2593. tbkdlg.dll
  2594. dialog
  2595. GlobalAlloc
  2596. GlobalLockPointer_
  2597. GlobalLock
  2598. GlobalUnlock
  2599. GlobalFree
  2600. SetTimer
  2601. KillTimer
  2602. bringwindowtotop
  2603. getFocus
  2604. getParent
  2605. getClassName
  2606. sendMessage
  2607. postmessage
  2608. setwindowtext
  2609. PeekMsg_
  2610. PeekMessage
  2611. kernel
  2612. s_Path
  2613. leaveBook
  2614. tbkdlg.dll
  2615. tbkwin.dll
  2616. kernel
  2617. enterpage
  2618. leavePage
  2619. author
  2620. tbkmmsbk
  2621. sysBookPath
  2622. *.sbk
  2623. Please find the sysBook tbkmm.sbk.
  2624. Save the tbkmm.sbk sysBook path.
  2625. OpenDlg
  2626. tbkmm.sbk
  2627. This is not tbkmm.sbk
  2628. sysBookPath
  2629. search
  2630. author
  2631. Search for:
  2632. Cancel
  2633. Cannot find "
  2634. ".  Search from beginning of book?
  2635. Cannot find "
  2636. oldPage
  2637. prompt
  2638. s_oldSearch
  2639. editScript
  2640. settimer
  2641. Unable to select text in the script window.
  2642. killtimer
  2643. scriptText
  2644. phase
  2645. getfocus
  2646. className
  2647. BufEdit
  2648. getparent
  2649. postmessage
  2650. setwindowtext
  2651. getparent
  2652. postmessage
  2653. getparent
  2654. getparent
  2655. postmessage
  2656. killtimer
  2657. class
  2658. phase
  2659. scriptText
  2660. classname
  2661.             
  2662. getclassname
  2663. class
  2664. aboutWidgets
  2665. aboutDlgInit
  2666. aboutDlgBox
  2667. dialog
  2668. retValue
  2669. setDefaultButtonStyle
  2670. pushButton
  2671. 0,75.3125,0
  2672. sysButtonStyle
  2673. isPosInt
  2674. eatclicks
  2675. GlobalAlloc
  2676. GlobalLockPointer_
  2677. GlobalFree
  2678. PeekMsg_
  2679. PeekMsg_
  2680. PeekMsg_
  2681. GlobalUnlock
  2682. GlobalFree
  2683. wFlags
  2684. dwBytes
  2685. lpMsg
  2686. onOrOff
  2687. appsamp.tbk
  2688. sFromAppSampler
  2689. "Driver Switch" 
  2690. asure the CD Device 
  2691. turned on
  2692. checkDevice trueOrFalse
  2693. --update 
  2694. `Position, Track 
  2695. Tracks 
  2696. 4s_device, s_idle
  2697.     --bypass status queries 
  2698. - isn't 
  2699. xtbkMCI("
  2700. -cdAudio media present","")
  2701. "Start 
  2702. "End 
  2703. ode","")
  2704. "play" 
  2705. updateStatus
  2706. upDateStatus
  2707. ","")
  2708. " <> 
  2709.     -- wait 
  2710. messages 
  2711. 4updating following stuff
  2712. tracks
  2713. ","")
  2714. current 
  2715. b","")
  2716. checkDevice
  2717. leavePage
  2718. upDateStatus
  2719. leavePage
  2720. Driver Switch
  2721. checkDevice
  2722. Driver Switch
  2723. Driver Switch
  2724. trueOrFalse
  2725. status cdAudio media present
  2726. tbkMCI
  2727. Position
  2728. Position
  2729. Track
  2730. Tracks
  2731. Start Position
  2732. End Position
  2733. status cdAudio mode
  2734. tbkMCI
  2735. _9updateStatus
  2736. s_device
  2737. s_idle
  2738. upDateStatus
  2739. status cdAudio position
  2740. tbkMCI
  2741. Position
  2742. Position
  2743. status cdAudio number of tracks
  2744. tbkMCI
  2745. Tracks
  2746. Tracks
  2747. status cdAudio current track
  2748. tbkMCI
  2749. Track
  2750. Track
  2751. s_device
  2752. s_idle
  2753. owaveFileName
  2754. setWaveFile
  2755. oDIBFileName
  2756. setDIBFile
  2757.     --close 
  2758. b file 
  2759. already 
  2760. tbkMCI("status wavefile mode","") 
  2761. c"play"
  2762. ","")
  2763. B's bitmap 
  2764. fa popup 
  2765. tbkBitmapchk("
  2766. " && 
  2767. oDIBfileName && "alias dibFile style child 
  2768. " && sysClientHandle, 1, 1)
  2769. 6ate 
  2770. translating 
  2771. emessages 
  2772. bmpHandle 
  2773.     translatewindowmessage 
  2774. bmpButtonup 
  2775. tbkMCIchk("
  2776. " && 
  2777.  && "
  2778. ","",1,1)
  2779.  wait","",1)
  2780. ","",1)
  2781. --prompt 
  2782. OpenDlg(".", "*.wav", "Choose a 
  2783. B.", "
  2784. ndib", "
  2785. .bmp extensions)", "
  2786. --dismiss 
  2787. they click 
  2788. BMPbuttonUp 
  2789.     untranslateAllWindowMessages 
  2790. ghtButtonUp
  2791. buttonDown
  2792. setWaveFile
  2793. setDIBFile
  2794. rightButtonUp
  2795. BMPbuttonUp
  2796. buttonDown
  2797. waveFileName
  2798. setWaveFile
  2799. DIBFileName
  2800. setDIBFile
  2801. status wavefile mode
  2802. tbkMCI
  2803. close waveFile
  2804. tbkMCI
  2805. DIBfileName
  2806. alias dibFile style child parent
  2807. tbkBitmapchk
  2808. window dibFile state show
  2809. tbkBitmapchk
  2810. status dibFile window
  2811. tbkBitmap
  2812. bmpButtonup
  2813. waveFileName
  2814. alias waveFile
  2815. tbkMCIchk
  2816. play waveFile wait
  2817. tbkMCIchk
  2818. close waveFile
  2819. tbkMCIchk
  2820. bmpButtonup
  2821. bmpHandle
  2822. rightButtonUp
  2823. setWaveFile
  2824. setDIBFile
  2825. setWaveFile
  2826. *.wav
  2827. Choose a wave file for this button.
  2828. Choose Wave File
  2829. OpenDlg
  2830. fileName
  2831. waveFileName
  2832. setDIBFile
  2833. *.dib
  2834. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  2835. Choose Bitmap File
  2836. OpenDlg
  2837. DIBFileName
  2838. DIBFileName
  2839. BMPbuttonUp
  2840. close dibFile
  2841. tbkBitmap
  2842. bmpHandle
  2843. Wave Audio:  Sound and Bitmaps
  2844. mmwidget.ico
  2845. wwwwp
  2846.