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