home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Classic / MultimediaClassic.mdf / app_main / toolbook / mmwidget.tbk / mmwidget.tbk (.txt)
Encoding:
Asymetrix ToolBook File  |  1992-01-30  |  485.5 KB  |  11,469 lines

  1. CD Audio:  CD To Wave Converter
  2. CD Audio:  CD To Wave Converter
  3. %&'R(
  4. <v>J@
  5. noCopy
  6. The controls on this page let you select a clip from a CD and create a wave file from that clip.  
  7. Use this page as you would the CD Audio Event editor page.  When you've seleced a clip, choose your sample rate (11-44 kHz) and the number of channels (stereo or mono), then click the Make A Wave Audio File button.  The clip will play and a wave file will be created from it.  You will be asked if you want to hear the wave file after it's made.
  8. Make sure a signal is going from the CD player to your audio card.  Sometimes a cable is needed for this.  Try different sample rates or number of channels for best results.
  9. The Driver On/Off widget  opens  and 
  10.  closes  the device and initializes the disc.  
  11. The Track and Position fields, as well as the slider position are updated by an 
  12.  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.  correctly.  e correctly.  ate correctly.  ctly.  
  13. editScript "
  14. tbkMCIchk(""
  15. cdAudio shareable""", 
  16. "Driver switch"
  17. buttonDown
  18. buttonDown
  19. editScript
  20. get tbkMCIchk("open cdAudio shareable"
  21. Driver switch
  22. editScript "
  23. tbkmci(""close cdAudio""", 
  24. "Driver switch"
  25. buttonDown
  26. buttonDown
  27. editScript
  28. get tbkmci("close cdAudio"
  29. Driver switch
  30. editScript "
  31. buttondown
  32. buttondown
  33. editScript
  34. to handle idle
  35.  s_device : a system variable used in the  idle  handler to bypass status queries if the device isn't open.
  36.  s_idle :  a system variable use to count idle messages.
  37.  s_start : a system variable used in the Scan Reverse button, Stop button and slider thumb containing the starting position of track 1.
  38.  s_end : a system variable used in the Scan Forward button containing the end position of the disc.
  39.  s_kHz : a system variable containing the sample rate used in the recording.
  40.  s_channels : a system variable containing the number of channels used in the recording.
  41. editScript "
  42. s_device 
  43. ""cdAudio""", 
  44. "Driver switch"
  45. buttonUp
  46. buttonUp
  47. editScript
  48. set s_device to "cdAudio"
  49. Driver switch
  50. editScript "
  51. s_device 
  52. buttonDown
  53. buttonDown
  54. editScript
  55. if s_device is null
  56. editScript "
  57. us_idle", 
  58. buttonDown
  59. buttonDown
  60. editScript
  61. decrement s_idle
  62. editScript "
  63. s_start 
  64. B"Scan Reverse"
  65. buttonUp
  66. buttonUp
  67. editScript
  68. set s_start to
  69. Scan Reverse
  70. editScript "
  71. s_end 
  72. B"Scan Forward"
  73. buttonUp
  74. buttonUp
  75. editScript
  76. set s_end to
  77. Scan Forward
  78. editScript "
  79. s_kHz 
  80. buttonDown
  81. buttonDown
  82. editScript
  83. set s_kHz to
  84. editScript "
  85. s_Channels 
  86. "stereoMono"
  87. buttonDown
  88. buttonDown
  89. editScript
  90. set s_Channels to
  91. stereoMono
  92. CD Audio
  93. CD to Wave Converter
  94. tbkMCI("play d:\mm\wave.
  95. 200 wait","")
  96. buttonUp
  97. buttonUp
  98. play d:\mm\wave.wav from 100 to 200 wait
  99. tbkMCI
  100. fileName
  101. d:\mm\wave.wav
  102. Button
  103. Start Position
  104. Start Clip: on:  n  
  105. End Position
  106. End Clip: on: tion  
  107. Make A Wave Audio File
  108. Make A Wave Audio File
  109. Play Clip
  110. Restart Clipck 
  111. Scan rt 
  112. Skip rt 
  113. Skip rt 
  114. Play rt 
  115. Scan rt 
  116. Driver On/Off
  117. PositionPosition
  118. Current Track: 
  119. Tracks on Disc  
  120. txclassname
  121. 3DFrame Recessed
  122. Tracks
  123. Track
  124. Position
  125. -- The 
  126. used only 
  127. you want 
  128. -updating 
  129. fits own timer.
  130. -- To turn the 
  131.  on, 
  132. running 
  133. "on" 
  134. tbkTimer("
  135. V shareable alias tmCDPos",
  136.  type periodic","")
  137.  1000","")
  138. aplay 
  139. vclose 
  140. multimedia
  141. ownerPgBkgnd 
  142. tbkMCI("sysinfo cdaudio use count","")
  143. (isNumber(
  144. tbkCDAudio("status cdAudio 
  145. ","")
  146. Tn-2 
  147. multimedia
  148. running
  149. running
  150. open timer shareable alias tmCDPos
  151. tbkTimer
  152. set tmCDPos type periodic
  153. tbkTimer
  154. set tmCDPos period 1000
  155. tbkTimer
  156. play tmCDPos
  157. tbkTimer
  158. close tmCDPos
  159. tbkTimer
  160. multimedia
  161. ownerPgBkgnd
  162. running
  163. sysinfo cdaudio use count
  164. tbkMCI
  165. isNumber
  166. status cdAudio position
  167. tbkCDAudio
  168. Pause t 
  169. Driver switch
  170. z%txclassname
  171. vSwitchHandle
  172. Restart
  173. Track 
  174. ~&txclassname
  175. 3DFrame Recessed
  176. 'txclassname
  177. 3DFrame Recessed
  178. Stop rt 
  179. Scan Reverse
  180. 4s_start
  181. checkDevice TRUE
  182.     --beginning 
  183. millisecFromMSF(tbkMCIchk("status cdAudio 
  184. track 1","",1,1)) + 1000
  185. ms","",1)
  186. ","",1)
  187.  + 5000
  188. " && 
  189. - 5000,"",1)
  190. " && 
  191. ,"",1)
  192. msf","",1)
  193. Play 
  194. ","",1,1)
  195. uttonDown
  196. buttonStillDown
  197. buttonDown
  198. buttonUp
  199. buttonDown
  200. checkDevice
  201. status cdAudio position track 1
  202. tbkMCIchk
  203. millisecFromMSF
  204. buttonStillDown
  205. s_start
  206. buttonStillDown
  207. set cdAudio time format ms
  208. tbkMCIchk
  209. status cdAudio position
  210. tbkMCIchk
  211. seek cdAudio to
  212. tbkMCIchk
  213. seek cdAudio to
  214. tbkMCIchk
  215. set cdAudio time format msf
  216. tbkMCIchk
  217. s_start
  218. buttonUp
  219. Play cdAudio
  220. tbkMCIchk
  221. Skip Reverse
  222. ZmaxTracks, 
  223. checkDevice TRUE
  224. tbkMCIchk("status cdAudio 
  225. tracks","",1,1)
  226. 0Status 
  227. 'current 
  228. &","",1)
  229. w <> 
  230. ~ > 1
  231. tmsf","",1)
  232. play 
  233. " && (
  234.  - 1) & ":00:00:00","",1)
  235. buttonDown
  236. buttonDown
  237. checkDevice
  238. status cdAudio number of tracks
  239. tbkMCIchk
  240. Status cdAudio current track
  241. tbkMCIchk
  242. set cdAudio time format tmsf
  243. tbkMCIchk
  244. play cdAudio from
  245. :00:00:00
  246. tbkMCIchk
  247. set cdAudio time format msf
  248. tbkMCIchk
  249. maxTracks
  250. Track
  251. Restart Track
  252. Ztrack
  253. checkDevice TRUE
  254. tbkMCIchk("Status cdAudio current 
  255. @","",1,1)
  256. tmsf","",1)
  257. Fplay 
  258. " && 
  259. v & ":00:00:00","",1)
  260. buttonDown
  261. buttonDown
  262. checkDevice
  263. Status cdAudio current track
  264. tbkMCIchk
  265. set cdAudio time format tmsf
  266. tbkMCIchk
  267. play cdAudio from
  268. :00:00:00
  269. tbkMCIchk
  270. set cdAudio time format msf
  271. tbkMCIchk
  272. track
  273. Pause
  274. checkDevice TRUE
  275. tbkMCIchk("Pause cdAudio","",1)
  276. buttonDown
  277. buttonDown
  278. checkDevice
  279. Pause cdAudio
  280. tbkMCIchk
  281. checkDevice TRUE
  282. tbkMCIchk("Stop cdAudio","",1,1)
  283. ms","",1)
  284. 8status 
  285. track 1","",1) + 1000
  286. _seek 
  287. " && 
  288. ,"",1)
  289. msf","",1)
  290. buttonDown
  291. buttonDown
  292. checkDevice
  293. Stop cdAudio
  294. tbkMCIchk
  295. set cdAudio time format ms
  296. tbkMCIchk
  297. status cdAudio position track 1
  298. tbkMCIchk
  299. seek cdAudio to
  300. tbkMCIchk
  301. set cdAudio time format msf
  302. tbkMCIchk
  303. Skip Forward
  304. ZmaxTracks, 
  305. checkDevice TRUE
  306. tbkMCIchk("status cdAudio 
  307. tracks","",1,1)
  308. 0Status 
  309. 'current 
  310. &","",1)
  311. w <> 
  312. tmsf","",1)
  313. play 
  314. " && (
  315.  + 1) & ":00:00:00","",1)
  316. buttonDown
  317. buttonDown
  318. checkDevice
  319. status cdAudio number of tracks
  320. tbkMCIchk
  321. Status cdAudio current track
  322. tbkMCIchk
  323. set cdAudio time format tmsf
  324. tbkMCIchk
  325. play cdAudio from
  326. :00:00:00
  327. tbkMCIchk
  328. set cdAudio time format msf
  329. tbkMCIchk
  330. maxTracks
  331. Track
  332. checkDevice TRUE
  333. tbkMCIchk("Play cdAudio","",1,1)
  334. buttonDown
  335. buttonDown
  336. checkDevice
  337. Play cdAudio
  338. tbkMCIchk
  339. Scan Forward
  340. 4s_end
  341. checkDevice TRUE
  342. millisecFromMSF(tbkMCIchk("status cdAudio length","",1,1))
  343. ms","",1)
  344. ","",1)
  345.  - 5000
  346. zeek 
  347. " && 
  348. + 5000,"",1)
  349. " && 
  350. ,"",1)
  351. msf","",1)
  352. Play 
  353. ","",1,1)
  354. uttonDown
  355. buttonStillDown
  356. buttonDown
  357. buttonUp
  358. buttonDown
  359. checkDevice
  360. status cdAudio length
  361. tbkMCIchk
  362. millisecFromMSF
  363. buttonStillDown
  364. s_end
  365. buttonStillDown
  366. set cdAudio time format ms
  367. tbkMCIchk
  368. status cdAudio position
  369. tbkMCIchk
  370. seek cdAudio to
  371. tbkMCIchk
  372. seek cdAudio to
  373. tbkMCIchk
  374. set cdAudio time format msf
  375. tbkMCIchk
  376. s_end
  377. buttonUp
  378. Play cdAudio
  379. tbkMCIchk
  380. Restart Clip
  381. "Start Position" 
  382. "Please 
  383. a clip 
  384. tbkMCIchk("seek cdAudio 
  385. " && 
  386. Z,"",1)
  387. buttonDown
  388. buttonDown
  389. Start Position
  390. Please select a clip first.
  391. seek cdAudio to
  392. Start Position
  393. tbkMCIchk
  394. Play Clip
  395. "Start Position" 
  396. "Please 
  397. a clip 
  398. tbkMCIchk("play cdAudio 
  399. " && 
  400. [&& \
  401. " && 
  402. "End 
  403. n,"",1)
  404. yieldApp()
  405. buttonDown
  406. buttonDown
  407. Start Position
  408. Please select a clip first.
  409. play cdAudio from
  410. Start Position
  411. End Position
  412. tbkMCIchk
  413. yieldApp
  414. Start Clip
  415. tbkMCIchk("status cdAudio 
  416. ","",1,1)
  417. "Start Position"
  418. buttonDown
  419. buttonDown
  420. status cdAudio position
  421. tbkMCIchk
  422. Start Position
  423. Start Clip
  424. End Clip
  425. tbkMCIchk("status cdAudio 
  426. ","",1,1)
  427. "End Position"
  428. buttonDown
  429. buttonDown
  430. status cdAudio position
  431. tbkMCIchk
  432. End Position
  433. End Clip
  434. stereoMono
  435. FALSE
  436. 4s_Channels
  437. radio 
  438. Bthat was clicked
  439. buttonDown
  440. buttonUp
  441. buttonDown
  442. buttonUp
  443. s_Channels
  444. Stereo
  445. FALSE
  446. 4s_kHz
  447. radio 
  448. Bthat was clicked
  449. buttonDown
  450. buttonUp
  451. buttonDown
  452. buttonUp
  453. s_kHz
  454. 11025
  455. 11 kHz
  456. 22050
  457. 22 kHz
  458. 44100
  459. 44 kHz
  460. 4s_kHz, s_channels
  461. ZstartPos, endPos, fileName
  462. "Start Position" 
  463. "End 
  464. "Please choose a 
  465. the clip 
  466. tbkMCI("
  467. qtype waveaudio alias waveFile buffer 9","")
  468. " && 
  469. 0samplespersec" && 
  470. Qitspersample 8","")
  471. pinput","")
  472. record 
  473. ","")
  474. play cdaudio 
  475. " && 
  476. " && 
  477. && "wait","")
  478. stop 
  479. ","")
  480. cTRUE
  481. ("Enter a 
  482. f".wav"
  483. FALSE
  484. filename && "already exists.
  485. Try a different 
  486. f"&OK" 
  487. "&Cancel"
  488. && " 
  489. f"&OK" 
  490. tbkMCIchk("
  491. " && 
  492. ,"",1)
  493. "Would you like 
  494. hear" && 
  495.  && "now?" 
  496. f"OK" 
  497. close 
  498. ","")
  499. buttonDown
  500. buttonDown
  501. Start Position
  502. End Position
  503. Please choose a start and end position for the clip first.
  504. open new type waveaudio alias waveFile buffer 9
  505. tbkMCI
  506. set waveFile channels
  507. tbkMCI
  508. set waveFile samplespersec
  509. tbkMCI
  510. set waveFile bitspersample 8
  511. tbkMCI
  512. cue waveFile input
  513. tbkMCI
  514. record waveFile
  515. tbkMCI
  516. play cdaudio from
  517. Start Position
  518. End Position
  519. tbkMCI
  520. stop waveFile
  521. tbkMCI
  522. Enter a file name for this wave file.
  523. cancel
  524. filename
  525. already exists.  Try a different name?
  526. &Cancel
  527. cancel
  528.  Try a different name?
  529. &Cancel
  530. save waveFile
  531. tbkMCIchk
  532. Would you like to hear
  533. Cancel
  534. play waveFile from 0 wait
  535. tbkMCIchk
  536. close waveFile
  537. tbkMCI
  538. startPos
  539. endPos
  540. fileName
  541. s_kHz
  542. s_channels
  543. 4s_bmpHandle
  544. ofileName
  545. rightButtonup
  546. B's bitmap 
  547. fa popup 
  548. tbkBitmapchk("
  549. " && 
  550. d && "alias dibFile style overlapped 
  551. " && 
  552. , 1, 1)
  553. " && 
  554. ox & "," & 
  555. oy,1)
  556. cate 
  557. translating 
  558. emessages 
  559. ("status 
  560.     translatewindowmessage 
  561. bmpWindowClose 
  562. bmpButtonup 
  563. --dismiss 
  564. they click 
  565. BMPbuttonUp
  566.     --we use a 
  567. here since a timer
  568.     --notification handler might 
  569. doesn't have access 
  570. container
  571.     untranslateAllWindowMessages 
  572. ("close 
  573. edirectly (Alt-f4)
  574. lets 
  575. efinish closing 
  576. 4sending a 
  577.     --which 
  578. turn sends a bmpButtonDown 
  579. windows 
  580. tbkTimerStart("single",500,100,
  581. tbkMMTimer
  582. bmpButtonUp
  583. OpenDlg(".", "*.*", "Choose a 
  584. (.dib 
  585.  extensions)", "
  586. ox & "," & 
  587. "0,0"
  588. ("Would you like 
  589. specify 
  590. e? If so, please enter 2 numeric coordinates." 
  591. ) <> 2
  592. "Invalid 
  593. x"0" 
  594. xisNumber(
  595. "Coordinate 
  596. z" && i && "
  597. tonUp
  598. buttonUp
  599. bmpWindowClose
  600. tbkMMTimer
  601. BMPbuttonUp
  602. rightButtonUp
  603. buttonUp
  604. fileName
  605. prightButtonup
  606. fileName
  607. alias dibFile style overlapped parent
  608. tbkBitmapchk
  609. window dibFile position
  610. tbkBitmapchk
  611. window dibFile state show
  612. tbkBitmapchk
  613. status dibFile window
  614. tbkBitmap
  615. bmpWindowClose
  616. bmpButtonup
  617. s_bmpHandle
  618. BMPbuttonUp
  619. close dibFile
  620. tbkBitmap
  621. s_bmpHandle
  622. bmpWindowClose
  623. single
  624. tbkTimerStart
  625. tbkMMTimer
  626. bmpButtonUp
  627. rightButtonUp
  628. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  629. Choose Bitmap File
  630. OpenDlg
  631. fileName
  632. fileName
  633. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  634. cancel
  635. Invalid number of coordinates.
  636. isNumber
  637. Coordinate number
  638. is not a number.
  639. 4s_bmpHandle
  640. FALSE
  641.     --close other bitmap that might be 
  642. tbkBitmap("
  643. /dibFile")
  644. fa popup 
  645. tbkBitmapchk("
  646. dib1.
  647. ; alias 
  648. D style 
  649. 0", 1, 1)
  650. _ state 
  651. translating 
  652. emessages 
  653. status 
  654.     translatewindowmessage 
  655. bmpWindowClose 
  656. bmpButtonup 
  657. --dismiss the 
  658. they click 
  659. BMPbuttonUp
  660.     unTranslateAllWindowMessages 
  661. a timer 
  662. edirectly (Alt-f4)
  663. lets 
  664. efinish closing 
  665. 4sending a 
  666.     --which 
  667. turn sends a bmpButtonDown 
  668. untranslate 
  669. windows 
  670. tbkTimerStart("single",500,100,
  671. tbkMMTimer
  672. bmpButtonUp
  673. ttonUp
  674. buttonDown
  675. BMPbuttonUp
  676. bmpWindowClose
  677. buttonUp
  678. tbkMMTimer
  679. buttonDown
  680. buttonUp
  681. close dibFile
  682. tbkBitmap
  683. open dib1.dib alias dibFile style popup
  684. tbkBitmapchk
  685. window dibFile state show
  686. tbkBitmapchk
  687. status dibFile window
  688. tbkBitmap
  689. bmpWindowClose
  690. bmpButtonup
  691. close
  692. s_bmpHandle
  693. BMPbuttonUp
  694. close dibFile
  695. tbkBitmap
  696. close
  697. s_bmpHandle
  698. bmpWindowClose
  699. single
  700. tbkTimerStart
  701. tbkMMTimer
  702. bmpButtonUp
  703. Animation:  More Buttons
  704. 4s_aniHandle
  705. tbkMCI("status aniFile ready","") 
  706. < <> 
  707.             untranslateAllWindowMessages 
  708. fclose 
  709. _","")
  710. leavePage
  711. leavePage
  712. status aniFile ready
  713. tbkMCI
  714. close aniFile
  715. tbkMCI
  716. s_aniHandle
  717. MCI lets you display animation files in their own windows.  See the  Window Styles  reference page to learn about different types of windows.
  718. To display an animation file in your own application, copy a Generic button to your book and  right click  it in Reader mode.  You'll be prompted for a file name.  That file name will be stored as a user property of the button.
  719. These buttons require you to click the animation window to close their files.  Or in the case of the overlapped window, close its window by pressing Alt+F4.  These buttons use the 
  720.  translateWindowMessage  control structure to trap mouse clicks in the animation window, which sends a ToolBook message to close the animation file.  The Overlapped button also traps a windows  Close Window  message.  If you use the translateWindowMessage structure, you must first show the animation window when using Popup or Overlapped window styles.
  721. ou must first show the animation window when using Popup or Overlapped window styles.
  722. eStyles"
  723. buttonDown
  724. buttonDown
  725. window Styles
  726. editScript "
  727. B"Popup, Manual Close"
  728. buttonDown
  729. buttonDown
  730. editScript
  731. to handle rightButtonUp
  732. Popup, Manual Close
  733. editScript "translatewindowmessage 
  734. s_aniHandle", 
  735. B"Popup, Manual Close"
  736. buttonDown
  737. buttonDown
  738. editScript
  739. translatewindowmessage for s_aniHandle
  740. Popup, Manual Close
  741. editScript "
  742. animateWindowClose 
  743. B"Overlapped, Manual 
  744. buttonDown
  745. buttonDown
  746. editScript
  747. before 16 send animateWindowClose to self
  748. Overlapped, Manual Close
  749.  aniFile : an alias for the current animation file.
  750.  s_aniHandle : a system variable containing the handle to the animation window..imation windows.e manually closed animation windows.
  751. editScript "alias aniFile", 
  752. B"Popup, Manual close"
  753. buttonDown
  754. buttonDown
  755. editScript
  756. alias aniFile
  757. Popup, Manual close
  758. editScript "
  759. s_aniHandle", 
  760. B"Overlapped, Manual Close"
  761. buttonDown
  762. buttonDown
  763. editScript
  764. set s_aniHandle
  765. Overlapped, Manual Close
  766. Animation
  767. More Generic Animation Buttonss
  768. Popup, Manual Close
  769. Popup, Manual Close
  770. Child, Manual Close
  771. Child, Manual Close
  772. Overlapped, Manual Close
  773. Overlapped, Manual Close
  774. 4s_aniHandle
  775. ofileName
  776. tbkMCI("status aniFile ready","") 
  777. ` <> 
  778.             untranslateAllWindowMessages 
  779. fclose 
  780. _","")
  781. tbkMCIchk("
  782. " && 
  783.  && \
  784. " && 
  785. && "style overlapped alias 
  786. ,1,1)
  787. state 
  788. ","",1)
  789. the animation 
  790. translating 
  791. emessages 
  792. ","",1)
  793.     translateWindowMessage 
  794. aniClose 
  795. animateWindowClose 
  796. play 
  797. ","",1)
  798.     --we use a 
  799. here since a timer
  800.     --notification handler might 
  801. doesn't have access 
  802. container
  803.     unTranslateAllWindowMessages 
  804. ","")
  805. --This handles 
  806. closes 
  807. edirectly (Alt-f4)
  808.     --Start 
  809. efinish its 
  810. Fclean 
  811. finished
  812. tbkTimerStart("single",500,100,
  813. tbkMMTimer
  814. OpenDlg(".", "*.fl?", "Choose 
  815. B.", "
  816. Animation 
  817. buttonUp
  818. animateWindowClose
  819. tbkMMTimer
  820. aniClose
  821. rightButtonUp
  822. buttonUp
  823. fileName
  824. prightButtonUp
  825. status aniFile ready
  826. tbkMCI
  827. close aniFile
  828. tbkMCI
  829. fileName
  830. parent
  831. style overlapped alias aniFile
  832. tbkMCIchk
  833. window aniFile state show
  834. tbkMCIchk
  835. status aniFile window handle
  836. tbkMCIchk
  837. aniClose
  838. animateWindowClose
  839. play aniFile
  840. tbkMCIchk
  841. s_aniHandle
  842. aniClose
  843. close aniFile
  844. tbkMCI
  845. s_aniHandle
  846. animateWindowClose
  847. single
  848. tbkTimerStart
  849. tbkMMTimer
  850. ^aniClose
  851. rightButtonUp
  852. *.fl?
  853. Choose an animation file for this button.
  854. Choose Animation File
  855. OpenDlg
  856. fileName
  857. fileName
  858. 4s_aniHandle
  859. ofileName
  860. tbkMCI("status aniFile ready","") 
  861. ` <> 
  862.             untranslateAllWindowMessages 
  863. fclose 
  864. _","")
  865. tbkMCIchk("
  866. " && 
  867.  && "alias 
  868. style child 
  869. " && sysClientHandle, "",1,1)
  870. the animation 
  871. translating 
  872. emessages 
  873. ","",1)
  874.     translatewindowmessage 
  875. aniButtonup 
  876. play 
  877. ","",1)
  878. --dismiss 
  879. they click 
  880. aniButtonUp
  881.     untranslateAllwindowMessages 
  882. ","")
  883. OpenDlg(".", "*.fl?", "Choose 
  884. B.", "
  885. Animation 
  886. tonUp
  887. aniButtonUp
  888. buttonUp
  889. rightButtonUp
  890. buttonUp
  891. fileName
  892. prightButtonUp
  893. status aniFile ready
  894. tbkMCI
  895. close aniFile
  896. tbkMCI
  897. fileName
  898. alias aniFile style child parent
  899. tbkMCIchk
  900. status aniFile window handle
  901. tbkMCIchk
  902. aniButtonup
  903. play aniFile
  904. tbkMCIchk
  905. s_aniHandle
  906. aniButtonUp
  907. close aniFile
  908. tbkMCI
  909. s_aniHandle
  910. rightButtonUp
  911. *.fl?
  912. Choose an animation file for this button.
  913. Choose Animation File
  914. OpenDlg
  915. fileName
  916. fileName
  917. -- MMWIDGET.TBK
  918. -- Book Script
  919. -- Contains routines specific 
  920. also 
  921. -- support 
  922. ,level modification 
  923. pasting 
  924. the widgets
  925. other instances 
  926. 4s_Path
  927. FALSE
  928. Xuser
  929.         WORD    GetWindowWord(
  930. LoadMenu(
  931. $,DWORD)
  932.         INT        GetMenuItemCount(
  933. KMenuItemID(
  934. aMenuString(
  935. q,POINTER,
  936. QDestroyMenu(
  937. X"KERNEL"
  938. ,    GlobalLock (
  939. lobalUnlock (
  940. lobalFree (
  941. lobalAlloc (
  942. cmenuName("Text") 
  943. "Save" 
  944. "SaveAs" 
  945. "Import" 
  946. "Export" 
  947. "PrintReport" 
  948. "Tutorial" 
  949. "Keyboard" 
  950. "Commands" 
  951. "UsingHelp" 
  952. "Glossary" 
  953. "Index" 
  954. "&Multimedia" 
  955. help") 
  956. "About This &
  957. ..." alias "aboutWidgets" 
  958.     linkDLL "tbkwin.dll"
  959.         INT popMenu(
  960. ,STRING,
  961. :dlg.
  962.     dialog(
  963. Xkernel
  964.     GlobalLockPointer_ = 
  965. SetTimer(
  966. KillTimer(
  967. bringwindowtotop( 
  968. getFocus()
  969. getParent( 
  970. getClassName( 
  971. LONG    sendMessage( 
  972. postmessage(
  973. setwindowtext(
  974. PeekMsg_ = PeekMessage(
  975. "tbkdlg.
  976. index
  977. Zchoice
  978. charlist 
  979. "229,231,230,231,229"
  980. menuList 
  981.     "{Wave Audio," & \
  982.         "Generic 
  983. Buttons," & \
  984.         "Simple Controls," & \
  985.         "Recording 
  986.         "Capability 
  987. Status," & \
  988.         "Sound 
  989. Animation," & \
  990.         "Event Editor," & "}," & \
  991.     "{Bitmap Graphics," & \
  992.         "A 
  993. ," & "}," & \
  994.     "{CD 
  995.         "Small 
  996.         "Large 
  997.         "Track Selector," & \
  998.         "CD 
  999. Converter," & "}," & \
  1000.     "{MIDI Sequencer," & \
  1001. ] & \
  1002.         "More 
  1003.  Panel," & \
  1004. ," & \
  1005.     "{Videodisc," & \
  1006.         "A 
  1007. ," & \
  1008.     "{Timers," & \
  1009. Timing 
  1010. ," & "}," & \
  1011.         "3D Objects," & \
  1012.         "Horizontal Sliders," & \
  1013.         "Vertical 
  1014.         "Fancy 
  1015.         "Dog 
  1016.  Mixer," & "}," & \
  1017.     "{Reference," & \
  1018.     ," & \
  1019.  Font Quick 
  1020. ," & \
  1021.  Dependencies," & \
  1022.     Cover Routines," & \
  1023. )     Styles," & "}"
  1024. "2000,750"
  1025. ,sysMagnification, 
  1026.  < 12
  1027.  < 20
  1028.  < 27
  1029.  < 34
  1030.  < 40
  1031.  < 44
  1032.  < 52
  1033. File 
  1034. CD To 
  1035. Midi 
  1036. wave,,,
  1037.  Panels,
  1038. ,,,3D 
  1039.      The 
  1040. tbkmmsbk
  1041. sysBookPath 
  1042. OpenDlg(".", "*.
  1043. o", "Please find 
  1044. .", "
  1045.  path.")
  1046. 4s_oldSearch
  1047. ZoldPage, prompt
  1048. "Cancel" 
  1049. selectedTextState <> 
  1050. "Cannot 
  1051. """ & 
  1052.  & """.
  1053. beginning 
  1054. f"&Yes" 
  1055. "&No"
  1056. """ & 
  1057.  & """."
  1058. editScript txt, obj
  1059. 4scriptText, phase, bk
  1060. settimer(sysclienthandle,1,100,0)
  1061. "Unable 
  1062. killtimer(
  1063. Zhwnd, class
  1064. getfocus()
  1065. + <> 0
  1066. className(
  1067. "BufEdit"
  1068. getparent(
  1069. ~), 273, 6512, 0)
  1070. ), 273, 2, 0)
  1071. )), 273, 6514, 0)
  1072. classname 
  1073. getclassname(
  1074. Zinit, retValue
  1075. aboutDlgInit 
  1076. aboutDlgBox 
  1077. setDefaultButtonStyle
  1078. sysButtonStyle    
  1079. "pushButton"
  1080. sysfontFace        
  1081. "Helv"
  1082. sysfontSize        
  1083. sysfontStyle    
  1084. sysTransParent    
  1085. "0,75.3125,0"
  1086. isPosInt num
  1087. sysDecimal 
  1088. = < 1
  1089. -- Function:
  1090. Eatclicks
  1091. -- Purpose:
  1092.  pending keyboard 
  1093. mouse messages
  1094. -- Parameters: 
  1095. -- Returns:
  1096. positive 
  1097. successful
  1098. eatclicks onOrOff
  1099. ZwFlags, dwBytes, cnt, hMsg, lpMsg
  1100.     -- Link 
  1101. Windows functions 
  1102. allocate a block 
  1103. memory only
  1104. xdone already
  1105.     -- GlobalAlloc flags
  1106.  32     -- 
  1107. MSG data structure, 
  1108. froom 
  1109. spare
  1110.  = 0 
  1111. GlobalFree(
  1112.     -- We now have a buffer 
  1113. we can call
  1114.     -- windows 
  1115.  we don't want
  1116.     -- Mouse 
  1117. , 512, 521, 1) <> 0
  1118. , 256, 264, 1) <> 0
  1119.  Accelerators
  1120. , 111, 112, 1) <> 0
  1121. GlobalUnlock(
  1122. -- EatClicks
  1123.  USName
  1124. ZhMenu, hBuffer, lpBuffer, result, hInstance, p
  1125. , -6)
  1126. %800) --MIR_READERMENU
  1127. MenuCount 
  1128. (2,2)
  1129. GetMenuString(
  1130. 63, 1024)
  1131. 1(0, 
  1132.     -- Remove DAM 
  1133. S, wherever 
  1134. may be
  1135. ~("&",
  1136. p > 0
  1137. author
  1138. index
  1139. enterBook
  1140. search
  1141. enterpage
  1142. editScript
  1143. leavePage
  1144. aboutWidgets
  1145. first
  1146. leaveBook
  1147. setDefaultButtonStyle
  1148. tbkmmsbk
  1149. isPosInt
  1150. eatclicks
  1151. classname
  1152. menuName
  1153. enterBook
  1154. GetWindowWord
  1155. LoadMenu
  1156. GetMenuItemCount
  1157. GetMenuItemID
  1158. GetMenuString
  1159. DestroyMenu
  1160. KERNEL
  1161. GlobalLock
  1162. GlobalUnlock
  1163. GlobalFree
  1164. GlobalAlloc
  1165. menuName
  1166. SaveAs
  1167. Import
  1168. Export
  1169. PrintReport
  1170. newPage
  1171. Tutorial
  1172. Keyboard
  1173. Commands
  1174. UsingHelp
  1175. Glossary
  1176. Index
  1177. &Multimedia
  1178. menuName
  1179. About This &Book...
  1180. aboutWidgets
  1181. menuName
  1182. sizeToPage
  1183. tbkwin.dll
  1184. popMenu
  1185. tbkdlg.dll
  1186. dialog
  1187. GlobalAlloc
  1188. GlobalLockPointer_
  1189. GlobalLock
  1190. GlobalUnlock
  1191. GlobalFree
  1192. SetTimer
  1193. KillTimer
  1194. bringwindowtotop
  1195. getFocus
  1196. getParent
  1197. getClassName
  1198. sendMessage
  1199. postmessage
  1200. setwindowtext
  1201. PeekMsg_
  1202. PeekMessage
  1203. kernel
  1204. s_Path
  1205. leaveBook
  1206. tbkdlg.dll
  1207. tbkwin.dll
  1208. kernel
  1209. enterpage
  1210. leavePage
  1211. author
  1212. index
  1213. author
  1214. 229,231,230,231,229
  1215. {Wave Audio,
  1216. Generic Wave Buttons,
  1217. Simple Controls,
  1218. Recording Controls,
  1219. Capability and Status,
  1220. Sound and Animation,
  1221. Event Editor,
  1222. {Bitmap Graphics,
  1223. Generic Bitmap Buttons,
  1224. A Bitmap Index,
  1225. {CD Audio,
  1226. Small Controls,
  1227. Large Controls,
  1228. Track Selector,
  1229. Capability and Status,
  1230. Event Editor,
  1231. CD to Wave Converter,
  1232. {MIDI Sequencer,
  1233. Generic MIDI Buttons,
  1234. Simple Controls,
  1235. Capability and Status,
  1236. Event Editor,
  1237. MIDI to Wave Converter,
  1238. {Animation,
  1239. Generic Animation Buttons,
  1240. More Generic Animation Buttons,
  1241. Control Panel,
  1242. Capability and Status,
  1243. Event Editor,
  1244. {Videodisc,
  1245. Simple Controls,
  1246. A Control Panel,
  1247. Capability and Status,
  1248. Event Editor,
  1249. {Timers,
  1250. Simple Timing Controls,
  1251. Capability,
  1252. {Generic Controls,
  1253. 3D Objects,
  1254. Horizontal Sliders,
  1255. Vertical Sliders,
  1256. Fancy Sliders,
  1257. Dog Sliders,
  1258. Audio Mixer,
  1259. {Reference,
  1260. About this Widget Book,
  1261. Widget Font Quick Reference,
  1262. Using the Widget Font,
  1263. Widget Dependencies,
  1264. Using the Cover Routines,
  1265. Window Styles,
  1266. 2000,750
  1267. popMenu
  1268. Wave Audio:  
  1269. Bitmap Graphics:  
  1270. cd Audio:  
  1271. MIDI Sequencer:  
  1272. Animation:  
  1273. Videodisc:  
  1274. Timers:  
  1275. Generic:  
  1276. ,Wave File Buttons,Simple Controls,Recording Controls,Status,Sound And Animation,Event Editor,,,Bitmap Buttons,A Bitmap Index,,,Small Simple Controls,Large Simple Controls,Track Selector,Status,Event Editor,CD To Wave Converter,,,Buttons,Simple Controls,Status,Event Editor,Midi to wave,,,Buttons,More Buttons,Control Panel,Status,Event Editor,,,Simple Controls,Control Panels,Status,Event Editor,,,Simple Timing Controls,Capability,,,3D Objects,Horizontal Sliders,Vertical Sliders,Fancy Sliders,Dog Sliders,Audio Mixer,,,About This Widget Book,Widget Font Quick Reference,Using The Widget Font,Widget Dependencies,Using The Cover Routines,Window Styles
  1277. menuList
  1278. charlist
  1279. choice
  1280. tbkmmsbk
  1281. sysBookPath
  1282. *.sbk
  1283. Please find the sysBook tbkmm.sbk.
  1284. Save the tbkmm.sbk sysBook path.
  1285. OpenDlg
  1286. tbkmm.sbk
  1287. This is not tbkmm.sbk
  1288. sysBookPath
  1289. search
  1290. author
  1291. Search for:
  1292. Cancel
  1293. Cannot find "
  1294. ".  Search from beginning of book?
  1295. Cannot find "
  1296. oldPage
  1297. prompt
  1298. s_oldSearch
  1299. editScript
  1300. settimer
  1301. Unable to select text in the script window.
  1302. killtimer
  1303. scriptText
  1304. phase
  1305. getfocus
  1306. className
  1307. BufEdit
  1308. getparent
  1309. postmessage
  1310. setwindowtext
  1311. getparent
  1312. postmessage
  1313. getparent
  1314. getparent
  1315. postmessage
  1316. killtimer
  1317. class
  1318. phase
  1319. scriptText
  1320. classname
  1321.             
  1322. getclassname
  1323. class
  1324. aboutWidgets
  1325. aboutDlgInit
  1326. aboutDlgBox
  1327. dialog
  1328. retValue
  1329. first
  1330. reader
  1331. setDefaultButtonStyle
  1332. pushButton
  1333. 0,75.3125,0
  1334. sysButtonStyle
  1335. isPosInt
  1336. eatclicks
  1337. GlobalAlloc
  1338. GlobalLockPointer_
  1339. GlobalFree
  1340. PeekMsg_
  1341. PeekMsg_
  1342. PeekMsg_
  1343. GlobalUnlock
  1344. GlobalFree
  1345. wFlags
  1346. dwBytes
  1347. lpMsg
  1348. onOrOff
  1349. menuName
  1350. GetWindowWord
  1351. LoadMenu
  1352. GetMenuItemCount
  1353. GlobalAlloc
  1354. GlobalLock
  1355. GetMenuString
  1356. GlobalUnlock
  1357. GlobalFree
  1358. DestroyMenu
  1359. MenuCount
  1360. hMenu
  1361. hBuffer
  1362. lpBuffer
  1363. result
  1364. hInstance
  1365. USName
  1366. 4s_bmpHandle
  1367. FALSE
  1368.     --close other bitmap that might be 
  1369. tbkBitmap("
  1370. /dibFile")
  1371. overlapped 
  1372. tbkBitmapchk("
  1373. dib3.
  1374. @ alias 
  1375. I style 
  1376. " && 
  1377. ,1,1)
  1378. j state 
  1379. translating 
  1380. emessages 
  1381. status 
  1382.     translatewindowmessage 
  1383. bmpWindowClose 
  1384. bmpButtonDown 
  1385. untranslate 
  1386. they 
  1387.     unTranslateAllWindowMessages 
  1388.  Graphics:
  1389.  Buttons"
  1390. a timer 
  1391. edirectly (Alt-f4)
  1392. lets 
  1393. efinish closing 
  1394. 4sending a 
  1395.     --which 
  1396. turn sends a 
  1397.  file
  1398. windows 
  1399. tbkTimerStart("single",500,100,
  1400. tbkMMTimer
  1401. ttonUp
  1402. buttonDown
  1403. bmpButtonDown
  1404. bmpWindowClose
  1405. buttonUp
  1406. tbkMMTimer
  1407. buttonDown
  1408. buttonUp
  1409. close dibFile
  1410. tbkBitmap
  1411. open dib3.dib alias dibFile style overlapped parent
  1412. tbkBitmapchk
  1413. window dibFile state show
  1414. tbkBitmap
  1415. status dibFile window
  1416. tbkBitmap
  1417. bmpWindowClose
  1418. bmpButtonDown
  1419. close
  1420. s_bmpHandle
  1421. bmpButtonDown
  1422. close dibFile
  1423. tbkBitmap
  1424. close
  1425. Bitmap Graphics:  Bitmap Buttons
  1426. s_bmpHandle
  1427. bmpWindowClose
  1428. single
  1429. tbkTimerStart
  1430. tbkMMTimer
  1431. 5fbmpButtonDown
  1432. 4s_device
  1433. Zswitch, x
  1434. -(y1, 
  1435. "off"
  1436. tbkMCI("stop cdAudio wait","")
  1437. --use 
  1438. asure 
  1439. worked
  1440. :close 
  1441. 5","")
  1442. 0,50.1875,0
  1443. tbkMCIchk("
  1444. shareable","",1,1)
  1445. ms","",1)
  1446. audio 
  1447. on","")
  1448.         --beginning 
  1449. atus 
  1450. track 1","")
  1451. H1000
  1452. " && 
  1453. msf","",1)
  1454. buttonUp
  1455. buttonUp
  1456. false
  1457. stop cdAudio wait
  1458. tbkMCI
  1459. close cdAudio
  1460. tbkMCI
  1461. open cdAudio shareable
  1462. tbkMCIchk
  1463. set cdAudio time format ms
  1464. tbkMCIchk
  1465. set cdAudio audio all on
  1466. tbkMCI
  1467. status cdAudio position track 1
  1468. tbkMCI
  1469. seek cdAudio to
  1470. tbkMCI
  1471. set cdAudio time format msf
  1472. tbkMCIchk
  1473. cdAudio
  1474. 120,50,100
  1475. switch
  1476. s_device
  1477. Ztrack, len
  1478. asure the driver switch 
  1479. turned on
  1480. "Driver Switch"
  1481. onumberOfTracks
  1482. FALSE
  1483. tbkMCIchk("status cdAudio length 
  1484. " && 
  1485. "",1,1)
  1486. MSFfromMillisec(millisecFromMSF(
  1487. ;) - 14)
  1488. bplay 
  1489. " && 
  1490.  & ":00:00:00 
  1491.         && 
  1492.  & ":" & 
  1493. ,1,1)
  1494. tbkmmNotify
  1495. mode","")
  1496. "playing"
  1497. current 
  1498. ","")
  1499. "stopped" 
  1500. "paused"
  1501. --initialize 
  1502.  selector
  1503. tracks 
  1504. numTracks
  1505. ! < 30
  1506. / + 1 
  1507. uttondown
  1508. buttonUp
  1509. buttondown
  1510. tbkmmNotify
  1511. tracks
  1512. buttondown
  1513. buttonUp
  1514. Driver Switch
  1515. Driver Switch
  1516. numberOfTracks
  1517. numberOfTracks
  1518. status cdAudio length track
  1519. tbkMCIchk
  1520. millisecFromMSF
  1521. MSFfromMillisec
  1522. play cdAudio from
  1523. :00:00:00 to
  1524. tbkMCIchk
  1525. track
  1526. tbkmmNotify
  1527. status cdAudio mode
  1528. tbkMCI
  1529. playing
  1530. status cdAudio current track
  1531. tbkMCI
  1532. stopped
  1533. paused
  1534. tracks
  1535. numberOfTracks
  1536. numTracks
  1537. "Driver Switch" 
  1538. asure the CD Device 
  1539. turned on
  1540. checkDevice trueOrFalse
  1541. --update 
  1542. `Position, Track 
  1543. Tracks 
  1544. 4s_device, s_idle
  1545.     --bypass status queries 
  1546. - isn't 
  1547. xtbkMCI("
  1548. -cdAudio media present","")
  1549. sliderPosition 
  1550. "Slider" 
  1551. ","")
  1552. E" <> 
  1553. ms","")
  1554. ","")
  1555. SliderPosition 
  1556. length","")
  1557. msf","")
  1558.     -- wait 
  1559. messages 
  1560. 4updating following stuff
  1561. tracks
  1562. ","")
  1563. current 
  1564. b","")
  1565. avePage
  1566. checkDevice
  1567. leavePage
  1568. leavePage
  1569. Driver Switch
  1570. checkDevice
  1571. Driver Switch
  1572. Driver Switch
  1573. trueOrFalse
  1574. status cdAudio media present
  1575. tbkMCI
  1576. Position
  1577. Position
  1578. Track
  1579. Tracks
  1580. Slider
  1581. sliderPosition
  1582. status cdAudio position
  1583. tbkMCI
  1584. Position
  1585. Position
  1586. set cdAudio time format ms
  1587. tbkMCI
  1588. status cdAudio position
  1589. tbkMCI
  1590. Slider
  1591. SliderPosition
  1592. status cdAudio length
  1593. tbkMCI
  1594. set cdAudio time format msf
  1595. tbkMCI
  1596. status cdAudio number of tracks
  1597. tbkMCI
  1598. Tracks
  1599. Tracks
  1600. status cdAudio current track
  1601. tbkMCI
  1602. Track
  1603. Track
  1604. s_device
  1605. s_idle
  1606. Timers:  Capability
  1607. g Controls
  1608. "capabilityResults"
  1609. leavePage
  1610. leavePage
  1611. capabilityResults
  1612. Only two capability items are available in the timer functions.  The minimum resolution represents how often the tbkmmTimer message can be sent.  The maximum period represents the longest delay possible for the timer.
  1613. Timers
  1614. Capability and Statuss
  1615. capability
  1616. Minimum Resolution:
  1617. Maximum Period:::
  1618. Capabilityes
  1619. Capabilityes
  1620. capabilityResults
  1621. Update capability
  1622. Zcapability
  1623. "capabilityResults"
  1624. tbkTimerCapability()
  1625. & CRLF & 
  1626. buttonDown
  1627. buttonDown
  1628. capabilityResults
  1629. tbkTimerCapability
  1630. capabilityResults
  1631. capability
  1632. Update Capability
  1633. 65535
  1634. Widget Dependencies
  1635. Widget Dependencies
  1636. For the widgets in this book to work correctly, several conditions must be met both in the ToolBook environment, and in the relationship between the widget objects and the page or background on which they reside.
  1637. TBKMM.SBK must be in startUpSysBooks.  This causes the  enterSystem 
  1638. handler in the sysBook to initialize the multimedia environment. 
  1639. bkdlg DLL
  1640. status fields and idle handler
  1641. sliders and idle handler
  1642. simple device controls and
  1643.   the driver switchhhhhhh
  1644. editScript "
  1645. ", tbkmmsbk()
  1646. buttonDown
  1647. buttonDown
  1648. editScript
  1649. to handle enterSystem
  1650. tbkmmsbk
  1651. The widget font TBKMMWID.FON must be present or many button captions will be incorrect.
  1652. TBKWIN.DLL, ToolBook's Windows DLL, is linked by the sysBook to allow use of the
  1653.   yieldApp( )  function.  This allows you to synchronize sound and animation.
  1654. TBKDLG.DLL is also linked by the sysBook to allow use of the  opendlg( )  function.  Many buttons prompt for a file name with this function.
  1655. Compound devices such as Wave Audio and MIDI use aliases.. driver switche handler
  1656. simple device controls and
  1657.   the driver switch
  1658. editScript "
  1659. yieldApp()", 
  1660. B"Roll The Wheel" 
  1661. "Wave Audio:
  1662. Sound 
  1663. Animation"
  1664. buttonDown
  1665. buttonDown
  1666. editScript
  1667. get yieldApp()
  1668. Roll The Wheel
  1669. Wave Audio:  Sound and Animation
  1670. editScript "
  1671. OpenDlg", 
  1672. B"Play And Wait" 
  1673. "Wave Audio:
  1674.     File Buttons"
  1675. buttonDown
  1676. buttonDown
  1677. editScript
  1678. get OpenDlg
  1679. Play And Wait
  1680. Wave Audio:  Wave File Buttons
  1681. Aliases, system variables and user properties of note are listed in the Script Notes field at the bottom left corner of each widget page.  Click their names to see where they're initialized.
  1682. Widget pages containing status fields such as Position, Track or Length fields usually require an  idle  handler in the page script.  These handlers may also update the positions of sliders.
  1683. Simple controls for devices like CD Audio usually have a 
  1684.  Driver Switch .  Other controls may reference this switch...r properties to see where they're set.
  1685. editScript "
  1686. "CD Audio:
  1687. Small Simple Controls"
  1688. buttonDown
  1689. buttonDown
  1690. editScript
  1691. to handle idle
  1692. CD Audio:  Small Simple Controls
  1693. 064/4
  1694. editScript "
  1695. ""Driver Switch""", 
  1696. "Track Selector" 
  1697. "CD Audio:
  1698. buttonDown
  1699. buttonDown
  1700. editScript
  1701. if not on of group "Driver Switch"
  1702. Track Selector
  1703. CD Audio:  Track Selector
  1704. Widget Font Quick Reference
  1705. 4s_oldScroll
  1706. "widgetFont" 
  1707. "bigfontlist"
  1708. enterpage
  1709. leavepage
  1710. enterpage
  1711. widgetFont
  1712. s_oldScroll
  1713. leavepage
  1714. bigfontlist
  1715. widgetFont
  1716. s_oldScroll
  1717. The Widget Font
  1718. Quick Reference
  1719. 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.
  1720. This font contains symbols for many multimedia controls and operations.  This table shows the ANSI values with the corresponding characters.rs.
  1721. 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.
  1722. Some characters in this font are designed to be used in pairs, for instance  
  1723. The next page explains some of the advantages and disadvantages of using this special font...
  1724.     ANSI         Widgettttt
  1725. widgetFont
  1726. buttonDown
  1727. buttonDown
  1728. textFromPoint
  1729. 32         
  1730. 33        !
  1731. 34        "
  1732. 35        #
  1733. 36        $
  1734. 37        %
  1735. 38        &
  1736. 39        '
  1737. 40        (
  1738. 41        )
  1739. 42        *
  1740. 43        +
  1741. 44        ,
  1742. 45        -
  1743. 46        .
  1744. 47        /
  1745. 48        0
  1746. 49        1
  1747. 50        2
  1748. 51        3
  1749. 52        4
  1750. 53        5
  1751. 54        6
  1752. 55        7
  1753. 56        8
  1754. 57        9
  1755. 58        :
  1756. 59        ;
  1757. 60        <
  1758. 61        =
  1759. 62        >
  1760. 63        ?
  1761. 64        @
  1762. 65        A
  1763. 66        B
  1764. 67        C
  1765. 68        D
  1766. 69        E
  1767. 70        F
  1768. 71        G
  1769. 72        H
  1770. 73        I
  1771. 74        J
  1772. 75        K
  1773. 76        L
  1774. 77        M
  1775. 78        N
  1776. 79        O
  1777. 80        P
  1778. 81        Q
  1779. 82        R
  1780. 83        S
  1781. 84        T
  1782. 85        U
  1783. 86        V
  1784. 87        W
  1785. 88        X
  1786. 89        Y
  1787. 90        Z
  1788. 91        [
  1789. 92        \
  1790. 93        ]
  1791. 94        ^
  1792. 95        _
  1793. 96        `
  1794. 97        a
  1795. 98        b
  1796. 99        c
  1797. 100    d
  1798. 101    e
  1799. 102    f
  1800. 103    g
  1801. 104    h
  1802. 105    i
  1803. 106    j
  1804. 107    k
  1805. 108    l
  1806. 109    m
  1807. 110    n
  1808. 111    o
  1809. 112    p
  1810. 113    q
  1811. 114    r
  1812. 115    s
  1813. 116    t
  1814. 117    u
  1815. 118    v
  1816. 119    w
  1817. 120    x
  1818. 121    y
  1819. 122    z
  1820. 123    {
  1821. 124    |
  1822. 125    }
  1823. 126    ~
  1824. "bigFontList"
  1825. printerPageBitmap 
  1826. FALSE
  1827. buttonUp
  1828. buttonUp
  1829. bigFontList
  1830. bigFontList
  1831. bigFontList
  1832. Print Font Reference Sheet
  1833. "bigFontList"
  1834. B"bigfontList"
  1835. buttonUp
  1836. buttonUp
  1837. bigFontList
  1838. bigfontList
  1839. Show Font Reference Sheet
  1840. Click a character to copy it to the clipboard.
  1841. bigfontlist
  1842. bigfontlist
  1843. 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 
  1844.     128 
  1845.     129 
  1846.     130 
  1847.     131 
  1848.     132 
  1849.     133 
  1850.     134 
  1851.     135 
  1852.     136 
  1853.     137 
  1854.     138 
  1855.     139 
  1856.     140 
  1857.     141 
  1858.     142 
  1859.     143 
  1860.     144 
  1861.     145 
  1862.     146 
  1863.     147 
  1864.     148 
  1865.     149 
  1866.     150 
  1867.     151 
  1868.     152 
  1869.     153 
  1870.     154 
  1871.     155 
  1872.     156 
  1873.     157 
  1874.     158 
  1875.     159 
  1876.     160 
  1877.     161 
  1878.     162 
  1879.     163 
  1880.     164 
  1881.     165 
  1882.     166 
  1883.     167 
  1884.     168 
  1885.     169 
  1886.     170 
  1887.     171 
  1888.     172 
  1889.     173 
  1890.     174 
  1891.     175 
  1892.     176 
  1893.     177 
  1894.     178 
  1895.     179 
  1896.     180 
  1897.     181 
  1898.     182 
  1899.     183 
  1900.     184 
  1901.     185 
  1902.     186 
  1903.     187 
  1904.     188 
  1905.     189 
  1906.     190 
  1907.     191 
  1908.     192 
  1909.     193 
  1910.     194 
  1911.     195 
  1912.     196 
  1913.     197 
  1914.     198 
  1915.     199 
  1916.     200 
  1917.     201 
  1918.     202 
  1919.     203 
  1920.     204 
  1921.     205 
  1922.     206 
  1923.     207 
  1924.     208 
  1925.     209 
  1926.     210 
  1927.     211 
  1928.     212 
  1929.     213 
  1930.     214 
  1931.     215 
  1932.     216 
  1933.     217 
  1934.     218 
  1935.     219 
  1936.     220 
  1937.     221 
  1938.     222 
  1939.     223 
  1940.     224 
  1941.     225 
  1942.     226 
  1943.     227 
  1944.     228 
  1945.     229 
  1946.     230 
  1947.     231 
  1948.     232 
  1949.     233 
  1950.     234 
  1951.     235 
  1952.     236 
  1953.     237 
  1954.     238 
  1955.     239 
  1956.     240 
  1957.     241 
  1958.     242 
  1959.     243 
  1960.     244 
  1961.     245 
  1962.     246 
  1963.     247 
  1964.     248 
  1965.     249 
  1966.     250 
  1967.     251 
  1968.     252 
  1969.     253 
  1970.     254 
  1971.                                         [OK]
  1972. bigFontList
  1973. &4S^/
  1974. buttonUp
  1975. buttonUp
  1976. ZstartPos, endPos, timeFormat
  1977. "Start Position" 
  1978. "Please 
  1979. a clip 
  1980. "End 
  1981. tbkMCI("status videodisc 
  1982. ","")
  1983. setDefaultButtonStyle
  1984. 2000,750
  1985. "Videodisc Clip"
  1986. }" & CRLF & TAB & \
  1987. ZoldTimeFormat" & 
  1988. shareable"",
  1989. )" & 
  1990. " && \
  1991. )" & 
  1992. " && 
  1993.  & """,
  1994. )" & 
  1995. "play 
  1996. " && 
  1997.  && \
  1998. " && 
  1999.  && "wait"",
  2000. )" & 
  2001. "" && 
  2002. )" & 
  2003. "close 
  2004. )" & 
  2005. Bthat plays 
  2006. " && 
  2007.  && \
  2008. " && 
  2009.  && "has been copied 
  2010. the clipboard."
  2011. buttonDown
  2012. buttonDown
  2013. Start Position
  2014. Please select a clip first.
  2015. Start Position
  2016. End Position
  2017. status videodisc time format
  2018. tbkMCI
  2019. setDefaultButtonStyle
  2020. Videodisc Clip
  2021. to handle buttonUp
  2022. local oldTimeFormat
  2023. get tbkMCI("open videodisc shareable","")
  2024. set oldTimeFormat to
  2025. tbkMCI("status videodisc time format","")
  2026. get tbkMCI("set videodisc time format
  2027. ","")
  2028. get tbkMCI("play videodisc from
  2029. wait","")
  2030. get tbkMCI("set videodisc time format to" && oldTimeFormat,"")
  2031. get tbkMCI("close videodisc","")
  2032. A button that plays from
  2033. has been copied to the clipboard.
  2034. startPos
  2035. endPos
  2036. timeFormat
  2037. 4s_aniHandle
  2038. ofileName
  2039. tbkMCI("status aniFile ready","") 
  2040. ` <> 
  2041.             untranslateAllWindowMessages 
  2042. fclose 
  2043. _","")
  2044. tbkMCIchk("
  2045. " && 
  2046.  && "alias 
  2047. style popup", "",1,1)
  2048. state 
  2049. ","",1)
  2050. the animation 
  2051. translating 
  2052. emessages 
  2053. ","",1)
  2054.     translateWindowMessage 
  2055. aniClose 
  2056. animateWindowClose 
  2057. play 
  2058. ","",1)
  2059.     --we use a 
  2060. here since a timer
  2061.     --notification handler might 
  2062. doesn't have access 
  2063. container
  2064.     unTranslateAllWindowMessages 
  2065. ","")
  2066. --This handles 
  2067. closes 
  2068. edirectly (Alt-f4)
  2069.     --Start 
  2070. efinish its 
  2071. Fclean 
  2072. finished
  2073. tbkTimerStart("single",500,100,
  2074. tbkMMTimer
  2075. OpenDlg(".", "*.fl?", "Choose 
  2076. B.", "
  2077. Animation 
  2078. buttonUp
  2079. animateWindowClose
  2080. tbkMMTimer
  2081. aniClose
  2082. rightButtonUp
  2083. buttonUp
  2084. fileName
  2085. prightButtonUp
  2086. status aniFile ready
  2087. tbkMCI
  2088. close aniFile
  2089. tbkMCI
  2090. fileName
  2091. alias aniFile style popup
  2092. tbkMCIchk
  2093. window aniFile state show
  2094. tbkMCIchk
  2095. status aniFile window handle
  2096. tbkMCIchk
  2097. aniClose
  2098. animateWindowClose
  2099. play aniFile
  2100. tbkMCIchk
  2101. s_aniHandle
  2102. aniClose
  2103. close aniFile
  2104. tbkMCI
  2105. s_aniHandle
  2106. animateWindowClose
  2107. single
  2108. tbkTimerStart
  2109. tbkMMTimer
  2110. ^aniClose
  2111. rightButtonUp
  2112. *.fl?
  2113. Choose an animation file for this button.
  2114. Choose Animation File
  2115. OpenDlg
  2116. fileName
  2117. fileName
  2118. Using the Widget font
  2119. in apps
  2120. Using the Widget Font in Your Applicationss
  2121. The widget font is installed dynamically in your ToolBook application by the ToolBook multimedia extensions.   The advantage of this is that the font does not have to be formally installed in Windows, but becomes available automatically as long as the file TBKMMWID.FON which you got as part of the multimedia extensions for ToolBook is in the DOS path.  
  2122. Advantages of the Widget font
  2123. * Make graphic button captions and indicators.
  2124. * Button captions and indicators are easy to change, because you simply change characters, not graphics.
  2125. * Reduces the object count, which makes your applications work faster and keeps their file size smaller. 
  2126. * Change the color of an icon simply by changing the stroke color of the button or field that contains it.ins it.ontains it.t contains it. that contains it...
  2127. Disadvantages of the Widget font
  2128. * You can't make multicolored icons, since each ToolBook button or field is limited to one stroke color at a time.
  2129. * If TBKMMWID.FON is not in the path, Windows substitutes a standard font that won't look anything like what you designed. However, this is the least of your problems if the required DLLs and system books cannot be found.  Simply make sure that the setup program or instructions handle this carefully.y.y..arefully.carefully.
  2130. buttonDown
  2131. buttonDown
  2132. k:to2
  2133. i:to1
  2134. changeCaption "
  2135. 7capt
  2136. buttonDown
  2137. changeCaption
  2138. buttonDown
  2139. 0changeCaption
  2140. 0changeCaption
  2141. 0changeCaption
  2142. 0changeCaption
  2143. changeCaption
  2144. buttonDown
  2145. buttonDown
  2146. o(41)
  2147. o(40)
  2148. o(39)
  2149. o(36)
  2150. o(33)
  2151. o(34)
  2152. o(35)
  2153. o(38)
  2154. buttonDown
  2155. buttonDown
  2156. buttonDown
  2157. buttonDown
  2158. k:to2
  2159. j:to1
  2160. buttonDown
  2161. buttonDown
  2162. k:to2
  2163. j:to1
  2164. buttonDown
  2165. buttonDown
  2166. k:to2
  2167. j:to1
  2168. buttonDown
  2169. buttonDown
  2170. buttonDown
  2171. buttonDown
  2172. "Driver switch"
  2173. FALSE
  2174. checkDevice trueOrFalse
  2175. JSwitch" 
  2176. 4s_device, s_idle
  2177.     --bypass queries 
  2178. "Length" 
  2179. "Track"
  2180. "Position"
  2181.     -- wait 
  2182. messages 
  2183. 4updating stuff
  2184. xtbkMCI("status videodisc media present","")
  2185.     --update 
  2186.  fields
  2187. ","")
  2188. oldF 
  2189. ","")
  2190. ms","")
  2191. " && 
  2192. <,"")
  2193. current track","")
  2194. length","")
  2195. avePage
  2196. checkDevice
  2197. leavePage
  2198. leavePage
  2199. Driver switch
  2200. Driver switch
  2201. checkDevice
  2202. Driver Switch
  2203. Driver Switch
  2204. trueOrFalse
  2205. Length
  2206. Length
  2207. Track
  2208. Position
  2209. status videodisc media present
  2210. tbkMCI
  2211. status videodisc position
  2212. tbkMCI
  2213. Position
  2214. Position
  2215. status videodisc time format
  2216. tbkMCI
  2217. set videodisc time format ms
  2218. tbkMCI
  2219. set videodisc time format
  2220. tbkMCI
  2221. status videodisc current track
  2222. tbkMCI
  2223. Track
  2224. Track
  2225. status videodisc length
  2226. tbkMCI
  2227. Length
  2228. Length
  2229. s_device
  2230. s_idle
  2231. 4s_scroll
  2232. "icons" 
  2233. clearExplanation
  2234. FALSE
  2235. "explain"
  2236. 4s_target
  2237. offSetNumber 
  2238. (selectedTextLines 
  2239. keyEnter 
  2240. selectedTextlines 
  2241. clearExplanation
  2242. leavePage
  2243. buttonDown
  2244. keyChar
  2245. enterPage
  2246. leaveField
  2247. enterPage
  2248. icons
  2249. s_scroll
  2250. leavePage
  2251. clearExplanation
  2252. clearExplanation
  2253. explain
  2254. icons
  2255. s_scroll
  2256. buttonDown
  2257. offSetNumber
  2258. s_target
  2259. keyChar
  2260. buttonDown
  2261. s_target
  2262. leaveField
  2263.  P"6#
  2264. %f'2(
  2265. .V/81
  2266. explain
  2267. Point to the buttons at the top of the page to see an explanation of what they do.  
  2268. Click a Topic button to go to the first page of that topic.  Click a Topic name to go to that page.
  2269. Topicss
  2270. icons
  2271. the most recently visited 
  2272. "explain"
  2273. clearExplanation
  2274. ouseEnter
  2275. mouseLeave
  2276. mouseEnter
  2277. buttonUp
  2278. mouseEnter
  2279. Go to the most recently visited page.
  2280. explain
  2281. mouseLeave
  2282. clearExplanation
  2283. buttonUp
  2284. txClassName
  2285. button
  2286. defStroke
  2287. 0,0,0
  2288. Previous
  2289. "explain"
  2290. clearExplanation
  2291. ouseEnter
  2292. mouseLeave
  2293. mouseEnter
  2294. buttonUp
  2295. mouseEnter
  2296. Go to the previous page.
  2297. explain
  2298. mouseLeave
  2299. clearExplanation
  2300. buttonUp
  2301. txClassName
  2302. button
  2303. defStroke
  2304. 0,0,0
  2305. "explain"
  2306. clearExplanation
  2307. tonUp
  2308. mouseEnter
  2309. buttonUp
  2310. mouseLeave
  2311. buttonUp
  2312. mouseEnter
  2313. Go to the next page.
  2314. explain
  2315. mouseLeave
  2316. clearExplanation
  2317. txClassName
  2318. button
  2319. defStroke
  2320. 0,0,0
  2321. "Return here." 
  2322. "explain"
  2323. clearExplanation
  2324. mouseEnter
  2325. mouseLeave
  2326. mouseEnter
  2327. Return here.
  2328. explain
  2329. mouseLeave
  2330. clearExplanation
  2331. defStroke
  2332. 0,0,0
  2333. txClassName
  2334. button
  2335. Index
  2336. "Pop up the Index 
  2337. "explain"
  2338. clearExplanation
  2339. index
  2340. ouseEnter
  2341. mouseLeave
  2342. mouseEnter
  2343. buttonUp
  2344. mouseEnter
  2345. Pop up the Index menu.
  2346. explain
  2347. mouseLeave
  2348. clearExplanation
  2349. buttonUp
  2350. index
  2351. txClassName
  2352. button
  2353. CLASSname
  2354. txButton
  2355. Widgets
  2356. widgets." 
  2357. "explain"
  2358. clearExplanation
  2359. ouseEnter
  2360. mouseLeave
  2361. mouseEnter
  2362. buttonUp
  2363. mouseEnter
  2364. Go to the first page of widgets.
  2365. explain
  2366. mouseLeave
  2367. clearExplanation
  2368. buttonUp
  2369. txClassName
  2370. button
  2371. defStroke
  2372. 0,0,0
  2373. Widgets
  2374. reference section." 
  2375. "explain"
  2376. clearExplanation
  2377. ouseEnter
  2378. mouseLeave
  2379. mouseEnter
  2380. buttonUp
  2381. mouseEnter
  2382. Go to the first page of the reference section.
  2383. explain
  2384. mouseLeave
  2385. clearExplanation
  2386. buttonUp
  2387. reference
  2388. defStroke
  2389. 0,0,0
  2390. txClassName
  2391. button
  2392. Reference
  2393. Search
  2394. "Search 
  2395. "explain"
  2396. clearExplanation
  2397. ouseEnter
  2398. mouseLeave
  2399. mouseEnter
  2400. buttonUp
  2401. mouseEnter
  2402. Search for text.
  2403. explain
  2404. mouseLeave
  2405. clearExplanation
  2406. buttonUp
  2407. search
  2408. defStroke
  2409. 0,0,0
  2410. txClassName
  2411. button
  2412. Search...
  2413. "Wave Audio:
  2414.     File Buttons"
  2415. buttonDown
  2416. buttonDown
  2417. Wave Audio:  Wave File Buttons
  2418. Wave Audio
  2419. offsetNumber
  2420. Generic Wave Buttons
  2421. Simple Controls
  2422. Recording Controls
  2423. Capability and Status
  2424. Sound and Animation
  2425. Event Editor
  2426. & "}," & \
  2427. ," & \
  2428. ," & \
  2429. ," & \
  2430. "Bitmap Graphics:
  2431. Buttons"
  2432. buttonDown
  2433. buttonDown
  2434. Bitmap Graphics:  Bitmap Buttons
  2435. Bitmap Graphics
  2436. x!offsetNumber
  2437. Generic Bitmap Buttons
  2438. A Bitmap Index
  2439. "CD Audio:
  2440. Small Simple Controls"
  2441. buttonDown
  2442. buttonDown
  2443. CD Audio:  Small Simple Controls
  2444. CD Audio
  2445. #offsetNumber
  2446. Small Controls
  2447. Large Controls
  2448. Track Selector
  2449. Capability and Status
  2450. Event Editor
  2451. CD to Wave Converter
  2452. "MIDI Sequencer:
  2453. Buttons"
  2454. buttonDown
  2455. buttonDown
  2456. MIDI Sequencer:  Buttons
  2457.  Q    &'"
  2458. L&offsetNumber
  2459. Generic MIDI Buttons
  2460. Simple Controls
  2461. Capability and Status
  2462. Event Editor
  2463. MIDI to Wave Converter
  2464. "Animation:
  2465. Buttons"
  2466. buttonDown
  2467. buttonDown
  2468. Animation:  Buttons
  2469. Animation
  2470. (offsetNumber
  2471. Generic Animation Buttons
  2472. More Buttons
  2473. Control Panel
  2474. Capability and Status
  2475. Event Editor
  2476. "Videodisc:
  2477. Simple Controls"
  2478. buttonDown
  2479. buttonDown
  2480. Videodisc:  Simple Controls
  2481. Videodisc
  2482. 4+offsetNumber
  2483. Simple Controls
  2484. A Control Panel
  2485. Capability and Status
  2486. Event Editorr
  2487. "Timers:
  2488. Simple Timing Controls"
  2489. buttonDown
  2490. buttonDown
  2491. Timers:  Simple Timing Controls
  2492. Timers
  2493. -offsetNumber
  2494. Simple Timing Controls
  2495. Capabilityndex
  2496. "Generic:
  2497. 3D Objects"
  2498. buttonDown
  2499. buttonDown
  2500. Generic:  3D Objects
  2501. Generic Controls
  2502. /offsetNumber
  2503. 3D Objects
  2504. Horizontal Sliders
  2505. Vertical Sliders
  2506. Fancy Sliders
  2507. Dog Sliders
  2508. Audio Mixer
  2509. Animation
  2510. Event Editor
  2511.  & "}," & \
  2512. ," & \
  2513. ," & \
  2514. ," & \
  2515. "About This Widget Book"
  2516. buttonDown
  2517. buttonDown
  2518. About This Widget Book
  2519. Reference
  2520. 2offsetNumber
  2521. About this Widget Book
  2522. Font Quick Reference
  2523. Using the Widget Font
  2524. Widget Dependencies
  2525. Using Check Functions
  2526. Window Styles of Window tl 
  2527. Go to the most recently visited page.
  2528. 4s_device
  2529. Zswitch, x
  2530. -(y1, 
  2531. "off"
  2532. tbkMCI("stop cdAudio wait","")
  2533. --use 
  2534. asure 
  2535. worked
  2536. :close 
  2537. 5","")
  2538. 0,50.1875,0
  2539. tbkMCIchk("
  2540. shareable","",1,1)
  2541. ms","",1)
  2542. audio 
  2543. on","")
  2544.         --beginning 
  2545. atus 
  2546. track 1","")
  2547. H1000
  2548. " && 
  2549. msf","",1)
  2550. buttonUp
  2551. buttonUp
  2552. false
  2553. stop cdAudio wait
  2554. tbkMCI
  2555. close cdAudio
  2556. tbkMCI
  2557. open cdAudio shareable
  2558. tbkMCIchk
  2559. set cdAudio time format ms
  2560. tbkMCIchk
  2561. set cdAudio audio all on
  2562. tbkMCI
  2563. status cdAudio position track 1
  2564. tbkMCI
  2565. seek cdAudio to
  2566. tbkMCI
  2567. set cdAudio time format msf
  2568. tbkMCIchk
  2569. cdAudio
  2570. 120,50,100
  2571. switch
  2572. s_device
  2573. MIDI Sequencer:  Buttons
  2574. Page Index
  2575. Generic:  Horizontal Sliders
  2576. 4s_vLength, oldF, sMode
  2577. checkDevice TRUE
  2578. tbkMCI("status videodisc mode","")
  2579. ","") 
  2580. ms","")
  2581. tbkMCIchk("
  2582. Slength","",1,1)
  2583. "milliseconds"
  2584.  * sliderPosition 
  2585. "HMS"
  2586. HMSFromMillisec(
  2587. "frames"
  2588. ("capability 
  2589. wplay rate","")/1000)
  2590. " && 
  2591.  * SliderPosition 
  2592. ),"")
  2593. " && 
  2594. "playing"
  2595. ","")
  2596. updateSlider "
  2597. uttonDown
  2598. buttonStillDown
  2599. buttonDown
  2600. buttonUp
  2601. buttonDown
  2602. checkDevice
  2603. status videodisc mode
  2604. tbkMCI
  2605. status videodisc time format
  2606. tbkMCI
  2607. set videodisc time format ms
  2608. tbkMCI
  2609. status videodisc length
  2610. tbkMCIchk
  2611. s_vLength
  2612. sMode
  2613. buttonStillDown
  2614. milliseconds
  2615. position
  2616. sliderPosition
  2617. position
  2618. sliderPosition
  2619. HMSFromMillisec
  2620. frames
  2621. position
  2622. sliderPosition
  2623. capability videodisc normal play rate
  2624. tbkMCI
  2625. s_vLength
  2626. buttonUp
  2627. seek videodisc to
  2628. SliderPosition
  2629. tbkMCI
  2630. set videodisc time format
  2631. tbkMCI
  2632. playing
  2633. play videodisc
  2634. tbkMCI
  2635. updateSlider
  2636. forward
  2637. s_vLength
  2638. sMode
  2639. cd Audio:  Track Selector
  2640. "Driver Switch" 
  2641. leavePage
  2642. leavePage
  2643. Driver Switch
  2644. CD Audio
  2645. Track Selector
  2646. lector
  2647. This track selector group can be copied to your application.  It is not dependent on a page script.tch.
  2648. uttons".  
  2649. This track selector object is made from a group of 30 buttons.  When the Driver On/Off switch is turned on, it 
  2650.  initializes  the driver, disc and the  track selector  by showing as many buttons as there are tracks on your CD.......CD.You can also initialize the track selector by right clicking it...by right clicking it..
  2651. editScript "
  2652. tbkMCIchk(""
  2653. cdAudio shareable""", 
  2654. "Driver switch"
  2655. buttonDown
  2656. buttonDown
  2657. editScript
  2658. get tbkMCIchk("open cdAudio shareable"
  2659. Driver switch
  2660. editScript "
  2661. tracks 
  2662. numTracks", 
  2663.      Selector"
  2664. buttonDown
  2665. buttonDown
  2666. editScript
  2667. to set tracks to numTracks
  2668. Track Selector
  2669. txclassname
  2670. 3DFrame Recessed
  2671. txclassname
  2672. 3DFrame Recessed
  2673. Driver 
  2674. On/Off
  2675. Driver switch
  2676. Zswitch, x
  2677. -(y1, 
  2678. "off"
  2679. tbkMCI("stop cdAudio wait","")
  2680. --use 
  2681. asure 
  2682. worked
  2683. :close 
  2684. 5","")
  2685. 0,50.1875,0
  2686. tracks 
  2687. "Track Selector" 
  2688. tbkMCIchk("
  2689. shareable","",1,1)
  2690. tmsf","",1)
  2691. audio 
  2692. on","")
  2693. zstatus 
  2694. ","",1)
  2695. buttonUp
  2696. buttonUp
  2697. false
  2698. stop cdAudio wait
  2699. tbkMCI
  2700. close cdAudio
  2701. tbkMCI
  2702. Track Selector
  2703. tracks
  2704. open cdAudio shareable
  2705. tbkMCIchk
  2706. 120,50,100
  2707. set cdAudio time format tmsf
  2708. tbkMCIchk
  2709. set cdAudio audio all on
  2710. tbkMCI
  2711. status cdAudio number of tracks
  2712. tbkMCIchk
  2713. Track Selector
  2714. tracks
  2715. switch
  2716. txclassname
  2717. vSwitchHandle
  2718. Track Selector
  2719. numberOfTracks
  2720. 4s_device
  2721. Zswitch, x
  2722. -(y1, 
  2723. "off"
  2724. tbkMCI("stop cdAudio wait","")
  2725. --use 
  2726. asure 
  2727. worked
  2728. :close 
  2729. 5","")
  2730. 0,50.1875,0
  2731. tbkMCIchk("
  2732. shareable","",1,1)
  2733. ms","",1)
  2734. audio 
  2735. on","")
  2736.         --beginning 
  2737. atus 
  2738. track 1","")
  2739. H1000
  2740. " && 
  2741. msf","",1,1)
  2742. buttonUp
  2743. buttonUp
  2744. false
  2745. stop cdAudio wait
  2746. tbkMCI
  2747. close cdAudio
  2748. tbkMCI
  2749. open cdAudio shareable
  2750. tbkMCIchk
  2751. set cdAudio time format ms
  2752. tbkMCIchk
  2753. set cdAudio audio all on
  2754. tbkMCI
  2755. status cdAudio position track 1
  2756. tbkMCI
  2757. seek cdAudio to
  2758. tbkMCI
  2759. set cdAudio time format msf
  2760. tbkMCIchk
  2761. cdAudio
  2762. 120,50,100
  2763. switch
  2764. s_device
  2765. "Driver switch"
  2766. FALSE
  2767. checkDevice trueOrFalse
  2768. JSwitch" 
  2769. 4s_device, s_idle
  2770.     --bypass queries 
  2771. xtbkMCI("status videodisc media present","")
  2772. "Length" 
  2773. "Track"
  2774. "Position"
  2775.     -- wait 
  2776. messages 
  2777. 4updating stuff
  2778.     --update Slider 
  2779.  fields
  2780. ","")
  2781. oldF 
  2782. ","")
  2783. ms","")
  2784. sliderPosition 
  2785. ","")\
  2786. length","")
  2787. " && 
  2788. current track","")
  2789. updateSlider dir
  2790. type","") = "CAV"
  2791. capability 
  2792. wplay rate","") / \
  2793. ) / 2) + .5
  2794. "reverse"
  2795. .5 - ((
  2796. f) / 2)
  2797. "still"
  2798. speed control" 
  2799. checkDevice
  2800. leavePage
  2801. updateSlider
  2802. leavePage
  2803. Driver switch
  2804. Driver switch
  2805. checkDevice
  2806. Driver Switch
  2807. Driver Switch
  2808. trueOrFalse
  2809. status videodisc media present
  2810. tbkMCI
  2811. Length
  2812. Length
  2813. Track
  2814. Position
  2815. status videodisc position
  2816. tbkMCI
  2817. Position
  2818. Position
  2819. status videodisc time format
  2820. tbkMCI
  2821. set videodisc time format ms
  2822. tbkMCI
  2823. position slider
  2824. sliderPosition
  2825. status videodisc position
  2826. tbkMCI
  2827. status videodisc length
  2828. tbkMCI
  2829. set videodisc time format
  2830. tbkMCI
  2831. status videodisc current track
  2832. tbkMCI
  2833. Track
  2834. Track
  2835. status videodisc length
  2836. tbkMCI
  2837. Length
  2838. Length
  2839. s_device
  2840. s_idle
  2841. updateSlider
  2842. status videodisc media type
  2843. tbkMCI
  2844. forward
  2845. capability videodisc normal play rate
  2846. tbkMCI
  2847. capability videodisc fast play rate
  2848. tbkMCI
  2849. reverse
  2850. capability videodisc normal play rate
  2851. tbkMCI
  2852. capability videodisc fast play rate
  2853. tbkMCI
  2854. still
  2855. still
  2856. videodisc speed control
  2857. sliderPosition
  2858. 4s_MediaType
  2859. checkDevice TRUE
  2860. s_mediaType 
  2861. tbkMCIchk("status videodisc 
  2862. $ type","",1,1)
  2863. "CAV"
  2864. :("play 
  2865. 1scan","")
  2866. 4s_pos,s_vLength
  2867. ms","")
  2868. ","")
  2869. length","")
  2870. H1000
  2871. HMSFromMillisec(
  2872. ","")
  2873. updateSlider "
  2874. " && 
  2875. "",1)
  2876. ","")
  2877. uttonDown
  2878. buttonStillDown
  2879. buttonDown
  2880. buttonUp
  2881. buttonDown
  2882. checkDevice
  2883. s_mediaType
  2884. status videodisc media type
  2885. tbkMCIchk
  2886. play videodisc scan
  2887. tbkMCI
  2888. set videodisc time format ms
  2889. tbkMCI
  2890. status videodisc position
  2891. tbkMCI
  2892. status videodisc length
  2893. tbkMCI
  2894. s_pos
  2895. s_vLength
  2896. s_MediaType
  2897. buttonStillDown
  2898. position
  2899. HMSFromMillisec
  2900. s_pos
  2901. s_vLength
  2902. s_MediaType
  2903. buttonUp
  2904. play videodisc
  2905. tbkMCI
  2906. updateSlider
  2907. forward
  2908. play videodisc from
  2909. tbkMCIchk
  2910. set videodisc time format HMS
  2911. tbkMCI
  2912. updateSlider
  2913. forward
  2914. s_pos
  2915. s_vLength
  2916. s_MediaType
  2917. Videodisc:  Control Panels
  2918. This panel was made from objects on the previous page.
  2919. Note that you must open the videodisc device before using these controls, and close it when you no longer need it.  Use the Driver switch to do this.
  2920. This control panel requires no page script.require this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.  This version of the handler is for CAV discs only.... CAV discs only.cs only.
  2921. Videodisc
  2922. A Control Panelss
  2923. checkDevice trueOrFalse
  2924. "Driver Switch" 
  2925. checkDevice
  2926. checkDevice
  2927. Driver Switch
  2928. Driver Switch
  2929. trueOrFalse
  2930. Driver switch
  2931. 4s_device
  2932. Zswitch, x
  2933. -(y1, 
  2934. "off"
  2935. tbkMCI("stop videodisc wait","")
  2936. --use 
  2937. asure 
  2938. worked
  2939. <close 
  2940. 7","")
  2941. 0,50.1875,0
  2942. tbkMCIchk("
  2943. shareable","",1,1)
  2944. buttonUp
  2945. buttonUp
  2946. false
  2947. stop videodisc wait
  2948. tbkMCI
  2949. close videodisc
  2950. tbkMCI
  2951. open videodisc shareable
  2952. tbkMCIchk
  2953. videodisc
  2954. 120,50,100
  2955. switch
  2956. s_device
  2957.     txclassname
  2958. vSwitchHandle
  2959. txclassname
  2960. 3DFrame Recessed
  2961. checkDevice TRUE
  2962. tbkMCI("status videodisc mode","") 
  2963. tbkMCIchk("
  2964. 'door closed","",1)
  2965. ","",1)
  2966. buttonUp
  2967. buttonUp
  2968. checkDevice
  2969. status videodisc mode
  2970. tbkMCI
  2971. set videodisc door closed
  2972. tbkMCIchk
  2973. set videodisc door open
  2974. tbkMCIchk
  2975. checkDevice TRUE
  2976. tbkMCIchk("stop videodisc","",1,1)
  2977. buttonUp
  2978. buttonUp
  2979. checkDevice
  2980. stop videodisc
  2981. tbkMCIchk
  2982. checkDevice TRUE
  2983. tbkMCIchk("seek videodisc 
  2984. 0","",1,1)
  2985. buttonUp
  2986. buttonUp
  2987. checkDevice
  2988. seek videodisc to 0
  2989. tbkMCIchk
  2990. 4s_MediaType
  2991. checkDevice TRUE
  2992. s_mediaType 
  2993. tbkMCIchk("status videodisc 
  2994. $ type","",1,1)
  2995. "CAV"
  2996. :("play 
  2997. 1reverse scan","")
  2998. 4s_pos
  2999. ms","")
  3000. ","")
  3001. U > 0
  3002. H1000
  3003. ","")
  3004. " && 
  3005. ,"",1)
  3006. HMS","")
  3007. uttonDown
  3008. buttonStillDown
  3009. buttonDown
  3010. buttonUp
  3011. buttonDown
  3012. checkDevice
  3013. s_mediaType
  3014. status videodisc media type
  3015. tbkMCIchk
  3016. play videodisc reverse scan
  3017. tbkMCI
  3018. set videodisc time format ms
  3019. tbkMCI
  3020. status videodisc position
  3021. tbkMCI
  3022. s_pos
  3023. s_MediaType
  3024. buttonStillDown
  3025. s_MediaType
  3026. s_pos
  3027. buttonUp
  3028. play videodisc reverse
  3029. tbkMCI
  3030. play videodisc from
  3031. tbkMCIchk
  3032. set videodisc time format HMS
  3033. tbkMCI
  3034. s_pos
  3035. s_MediaType
  3036. checkDevice TRUE
  3037. tbkMCIchk("play videodisc reverse","",1,1)
  3038. buttonUp
  3039. buttonUp
  3040. checkDevice
  3041. play videodisc reverse
  3042. tbkMCIchk
  3043. checkDevice TRUE
  3044. tbkMCIchk("
  3045. videodisc reverse","",1,1)
  3046. buttonDown
  3047. buttonStillDown
  3048. buttonDown
  3049. checkDevice
  3050. buttonStillDown
  3051. step videodisc reverse
  3052. tbkMCIchk
  3053. checkDevice TRUE
  3054. tbkMCIchk("
  3055. videodisc","",1,1)
  3056. buttonUp
  3057. buttonUp
  3058. checkDevice
  3059. pause videodisc
  3060. tbkMCIchk
  3061. checkDevice TRUE
  3062. tbkMCIchk("
  3063. videodisc","",1,1)
  3064. buttonDown
  3065. buttonStillDown
  3066. buttonDown
  3067. checkDevice
  3068. buttonStillDown
  3069. step videodisc
  3070. tbkMCIchk
  3071. checkDevice TRUE
  3072. tbkMCI("play videodisc","")
  3073. buttonUp
  3074. buttonUp
  3075. checkDevice
  3076. play videodisc
  3077. tbkMCI
  3078. 4s_MediaType
  3079. checkDevice TRUE
  3080. s_mediaType 
  3081. tbkMCIchk("status videodisc 
  3082. $ type","",1,1)
  3083. "CAV"
  3084. :("play 
  3085. 1scan","")
  3086. 4s_pos,s_vLength
  3087. ms","")
  3088. ","")
  3089. length","")
  3090. H1000
  3091. ","")
  3092. " && 
  3093. "",1)
  3094. HMS","")
  3095. uttonDown
  3096. buttonStillDown
  3097. buttonDown
  3098. buttonUp
  3099. buttonDown
  3100. checkDevice
  3101. s_mediaType
  3102. status videodisc media type
  3103. tbkMCIchk
  3104. play videodisc scan
  3105. tbkMCI
  3106. set videodisc time format ms
  3107. tbkMCI
  3108. status videodisc position
  3109. tbkMCI
  3110. status videodisc length
  3111. tbkMCI
  3112. s_pos
  3113. s_vLength
  3114. s_MediaType
  3115. buttonStillDown
  3116. s_MediaType
  3117. s_pos
  3118. s_vLength
  3119. buttonUp
  3120. play videodisc
  3121. tbkMCI
  3122. play videodisc from
  3123. tbkMCIchk
  3124. set videodisc time format HMS
  3125. tbkMCI
  3126. s_pos
  3127. s_vLength
  3128. s_MediaType
  3129. cd Audio:  Large Simple Controls
  3130. #$&F)
  3131. ,^0N4z5
  3132. CD Audio
  3133. Large Simple Controls
  3134. ntrols
  3135. These are large versions of the controls on the preceding page.  For a description of these controls, see that page.
  3136.  s_device : a system variable used in the  idle  handler to bypass status queries if the device isn't open.
  3137.  s_idle :  a system variable use to count idle messages.
  3138.  s_prompt : a system variable containing the last value entered when prompting for the play from/to positions.
  3139.  s_start : a system variable used in the Scan Reverse button, Stop button and slider thumb containing the starting position of track 1.
  3140.  s_end : a system variable used in the Scan Forward button containing the end position of the disc.
  3141. editScript "
  3142. s_device 
  3143. ""cdAudio""", 
  3144. "Driver switch"
  3145. buttonUp
  3146. buttonUp
  3147. editScript
  3148. set s_device to "cdAudio"
  3149. Driver switch
  3150. editScript "
  3151. s_device 
  3152. buttonDown
  3153. buttonDown
  3154. editScript
  3155. if s_device is null
  3156. editScript "
  3157. us_idle", 
  3158. buttonDown
  3159. buttonDown
  3160. editScript
  3161. decrement s_idle
  3162. editScript "
  3163. tbkMCIchk(""play cdAudio 
  3164. "" && s_prompt", 
  3165. buttonUp
  3166. buttonUp
  3167. editScript
  3168. get tbkMCIchk("play cdAudio from" && s_prompt
  3169. play from
  3170. editScript "
  3171. s_start 
  3172. B"Scan Reverse"
  3173. buttonUp
  3174. buttonUp
  3175. editScript
  3176. set s_start to
  3177. Scan Reverse
  3178. editScript "
  3179. s_end 
  3180. B"Scan Forward"
  3181. buttonUp
  3182. buttonUp
  3183. editScript
  3184. set s_end to
  3185. Scan Forward
  3186. Eject t 
  3187. Restart Track  
  3188. Stop rt 
  3189. Play Track
  3190. Play From....
  3191. Play To...  
  3192. Play From To...
  3193. Scan rt 
  3194. Skip rt 
  3195. Pause t 
  3196. Skip rt 
  3197. Play rt 
  3198. Scan rt 
  3199. Driver On/Off
  3200. Driver switch
  3201. txclassname
  3202. vSwitchHandle
  3203. Scan Reverse
  3204. 4s_start
  3205. checkDevice TRUE
  3206.     --beginning 
  3207. millisecFromMSF(tbkMCIchk("status cdAudio 
  3208. track 1","",1,1)) + 1000
  3209. ms","",1)
  3210. ","",1)
  3211.  + 5000
  3212. " && 
  3213. - 5000,"",1)
  3214. " && 
  3215. ,"",1)
  3216. msf","",1)
  3217. Play 
  3218. ","",1,1)
  3219. uttonDown
  3220. buttonStillDown
  3221. buttonDown
  3222. buttonUp
  3223. buttonDown
  3224. checkDevice
  3225. status cdAudio position track 1
  3226. tbkMCIchk
  3227. millisecFromMSF
  3228. buttonStillDown
  3229. s_start
  3230. buttonStillDown
  3231. set cdAudio time format ms
  3232. tbkMCIchk
  3233. status cdAudio position
  3234. tbkMCIchk
  3235. seek cdAudio to
  3236. tbkMCIchk
  3237. seek cdAudio to
  3238. tbkMCIchk
  3239. set cdAudio time format msf
  3240. tbkMCIchk
  3241. s_start
  3242. buttonUp
  3243. Play cdAudio
  3244. tbkMCIchk
  3245. Skip Reverse
  3246. ZmaxTracks, 
  3247. checkDevice TRUE
  3248. tbkMCIchk("status cdAudio 
  3249. tracks","",1,1)
  3250. 0Status 
  3251. 'current 
  3252. &","",1)
  3253. w <> 
  3254. ~ > 1
  3255. tmsf","",1)
  3256. play 
  3257. " && (
  3258.  - 1) & ":00:00:00","",1)
  3259. buttonDown
  3260. buttonDown
  3261. checkDevice
  3262. status cdAudio number of tracks
  3263. tbkMCIchk
  3264. Status cdAudio current track
  3265. tbkMCIchk
  3266. set cdAudio time format tmsf
  3267. tbkMCIchk
  3268. play cdAudio from
  3269. :00:00:00
  3270. tbkMCIchk
  3271. set cdAudio time format msf
  3272. tbkMCIchk
  3273. maxTracks
  3274. Track
  3275. Pause
  3276. checkDevice TRUE
  3277. tbkMCIchk("Pause cdAudio","",1)
  3278. buttonDown
  3279. buttonDown
  3280. checkDevice
  3281. Pause cdAudio
  3282. tbkMCIchk
  3283. Skip Forward
  3284. ZmaxTracks, 
  3285. checkDevice TRUE
  3286. tbkMCIchk("status cdAudio 
  3287. tracks","",1,1)
  3288. 0Status 
  3289. 'current 
  3290. &","",1)
  3291. w <> 
  3292. tmsf","",1)
  3293. play 
  3294. " && (
  3295.  + 1) & ":00:00:00","",1)
  3296. buttonDown
  3297. buttonDown
  3298. checkDevice
  3299. status cdAudio number of tracks
  3300. tbkMCIchk
  3301. Status cdAudio current track
  3302. tbkMCIchk
  3303. set cdAudio time format tmsf
  3304. tbkMCIchk
  3305. play cdAudio from
  3306. :00:00:00
  3307. tbkMCIchk
  3308. set cdAudio time format msf
  3309. tbkMCIchk
  3310. maxTracks
  3311. Track
  3312. checkDevice TRUE
  3313. tbkMCIchk("Play cdAudio","",1,1)
  3314. buttonDown
  3315. buttonDown
  3316. checkDevice
  3317. Play cdAudio
  3318. tbkMCIchk
  3319. Scan Forward
  3320. 4s_end
  3321. checkDevice TRUE
  3322. millisecFromMSF(tbkMCIchk("status cdAudio length","",1,1))
  3323. ms","",1)
  3324. ","",1)
  3325.  - 5000
  3326. zeek 
  3327. " && 
  3328. + 5000,"",1)
  3329. " && 
  3330. ,"",1)
  3331. msf","",1)
  3332. Play 
  3333. ","",1,1)
  3334. uttonDown
  3335. buttonStillDown
  3336. buttonDown
  3337. buttonUp
  3338. buttonDown
  3339. checkDevice
  3340. status cdAudio length
  3341. tbkMCIchk
  3342. millisecFromMSF
  3343. buttonStillDown
  3344. s_end
  3345. buttonStillDown
  3346. set cdAudio time format ms
  3347. tbkMCIchk
  3348. status cdAudio position
  3349. tbkMCIchk
  3350. seek cdAudio to
  3351. tbkMCIchk
  3352. seek cdAudio to
  3353. tbkMCIchk
  3354. set cdAudio time format msf
  3355. tbkMCIchk
  3356. s_end
  3357. buttonUp
  3358. Play cdAudio
  3359. tbkMCIchk
  3360. Restart Track
  3361. Ztrack
  3362. checkDevice TRUE
  3363. tbkMCIchk("Status cdAudio current 
  3364. @","",1,1)
  3365. tmsf","",1)
  3366. Fplay 
  3367. " && 
  3368. v & ":00:00:00","",1)
  3369. buttonDown
  3370. buttonDown
  3371. checkDevice
  3372. Status cdAudio current track
  3373. tbkMCIchk
  3374. set cdAudio time format tmsf
  3375. tbkMCIchk
  3376. play cdAudio from
  3377. :00:00:00
  3378. tbkMCIchk
  3379. set cdAudio time format msf
  3380. tbkMCIchk
  3381. track
  3382. checkDevice TRUE
  3383. tbkMCIchk("Stop cdAudio","",1,1)
  3384. ms","",1)
  3385. 8status 
  3386. track 1","",1) + 1000
  3387. _seek 
  3388. " && 
  3389. ,"",1)
  3390. msf","",1)
  3391. buttonDown
  3392. buttonDown
  3393. checkDevice
  3394. Stop cdAudio
  3395. tbkMCIchk
  3396. set cdAudio time format ms
  3397. tbkMCIchk
  3398. status cdAudio position track 1
  3399. tbkMCIchk
  3400. seek cdAudio to
  3401. tbkMCIchk
  3402. set cdAudio time format msf
  3403. tbkMCIchk
  3404. Play Track
  3405. Ztrack, len
  3406. checkDevice TRUE
  3407. tbkMCIchk("Status cdAudio current 
  3408. E","",1,1)
  3409. !length 
  3410. b" && 
  3411. i"",1)
  3412. MSFfromMillisec(millisecFromMSF(
  3413. ) - 14)
  3414. tmsf","",1)
  3415. play 
  3416. " && 
  3417.  & ":00:00:00 
  3418.         && 
  3419.  & ":" & 
  3420. ,"",1)
  3421. buttonDown
  3422. buttonDown
  3423. checkDevice
  3424. Status cdAudio current track
  3425. tbkMCIchk
  3426. Status cdAudio length track
  3427. tbkMCIchk
  3428. millisecFromMSF
  3429. MSFfromMillisec
  3430. set cdAudio time format tmsf
  3431. tbkMCIchk
  3432. play cdAudio from
  3433. :00:00:00 to
  3434. tbkMCIchk
  3435. set cdAudio time format msf
  3436. tbkMCIchk
  3437. track
  3438. Play From
  3439. 4s_prompt
  3440. ZtrackNumber
  3441. checkDevice TRUE
  3442. ("Play 
  3443. (Examples: ""3:45"", ""
  3444. E 4""):" 
  3445. tbkMCIchk("
  3446. cdAudio 
  3447. tmsf","",1)
  3448. %play 
  3449. " && 
  3450.  & ":00:00:00","",1,1)
  3451. " && 
  3452.  & ":00","",1,1)
  3453. buttonDown
  3454. buttonDown
  3455. checkDevice
  3456. Play from (Examples: "3:45", "track 4"):
  3457. cancel
  3458. track
  3459. set cdAudio time format tmsf
  3460. tbkMCIchk
  3461. play cdAudio from
  3462. :00:00:00
  3463. tbkMCIchk
  3464. set cdAudio time format msf
  3465. tbkMCI
  3466. set cdAudio time format msf
  3467. tbkMCIchk
  3468. play cdAudio from
  3469. tbkMCIchk
  3470. trackNumber
  3471. s_prompt
  3472. Play To
  3473. 4s_prompt
  3474. ZtrackNumber
  3475. checkDevice TRUE
  3476. ("Play 
  3477. (Examples: ""3:45"", ""
  3478. E 4""):" 
  3479. tbkMCIchk("
  3480. cdAudio 
  3481. tmsf","",1)
  3482. %play 
  3483. " && 
  3484.  & ":00:00:00","",1,1)
  3485. " && 
  3486.  & ":00","",1,1)
  3487. buttonDown
  3488. buttonDown
  3489. checkDevice
  3490. Play to (Examples: "3:45", "track 4"):
  3491. cancel
  3492. track
  3493. set cdAudio time format tmsf
  3494. tbkMCIchk
  3495. play cdAudio to
  3496. :00:00:00
  3497. tbkMCIchk
  3498. set cdAudio time format msf
  3499. tbkMCI
  3500. set cdAudio time format msf
  3501. tbkMCIchk
  3502. play cdAudio to
  3503. tbkMCIchk
  3504. trackNumber
  3505. s_prompt
  3506. Play From To
  3507. 4s_prompt
  3508. checkDevice TRUE
  3509. ("Play 
  3510. (Examples: ""3:45 
  3511. 4:17"", ""track 4 
  3512. 9""):" 
  3513. tbkMCIchk("
  3514. cdAudio 
  3515. tmsf","",1)
  3516. %play 
  3517. " && \
  3518.  & ":00:00:00 
  3519. " && \
  3520.  & ":00:00:00","",1,1)
  3521. " && \
  3522.  & ":00 
  3523. " && \
  3524.  & ":00","",1,1)
  3525. buttonDown
  3526. buttonDown
  3527. checkDevice
  3528. Play from (Examples: "3:45 to 4:17", "track 4 to 9"):
  3529. cancel
  3530. track
  3531. set cdAudio time format tmsf
  3532. tbkMCIchk
  3533. play cdAudio from
  3534. :00:00:00 to
  3535. :00:00:00
  3536. tbkMCIchk
  3537. set cdAudio time format msf
  3538. tbkMCI
  3539. set cdAudio time format msf
  3540. tbkMCIchk
  3541. play cdAudio from
  3542. :00 to
  3543. tbkMCIchk
  3544. s_prompt
  3545. 4txclassname
  3546. 3DFrame Recessed
  3547. Tracks
  3548. Track
  3549. Position
  3550. Position:
  3551. Current Track: 
  3552. Tracks on Disc: 
  3553. Slider
  3554. :txClassName
  3555. Slider
  3556. ^=,@2
  3557. thumb
  3558. --thumb 
  3559. play cd audio 
  3560. slider 
  3561. Zlen, startDisc
  3562. checkDevice TRUE
  3563. tbkMCIchk("
  3564. cdaudio 
  3565. ms","",1,1)
  3566. 'status 
  3567. $length","",1,1)
  3568. (SliderPosition 
  3569. <cdAudio 
  3570. track 1","",1) + 1000
  3571. " && 
  3572. ,"",1)
  3573. msf","",1)
  3574. buttonUp
  3575. buttonUp
  3576. checkDevice
  3577. set cdaudio time format ms
  3578. tbkMCIchk
  3579. status cdaudio length
  3580. tbkMCIchk
  3581. SliderPosition
  3582. status cdAudio position track 1
  3583. tbkMCIchk
  3584. play cdaudio from
  3585. tbkMCIchk
  3586. set cdAudio time format msf
  3587. tbkMCIchk
  3588. startDisc
  3589. P@D@defStrokeColor
  3590. 0,0,0
  3591. h@^@width
  3592. @v@glide
  3593. line id 193 of page id 2
  3594. @defFillColor
  3595. 0,100,0
  3596. @txClassName
  3597. HSliderThumb
  3598. fAtxclassname
  3599. 3DFrame Recessed
  3600. Eject
  3601. checkDevice TRUE
  3602. tbkMCIchk("status cdAudio mode","",1,1) 
  3603. "door closed","",1)
  3604. ","",1)
  3605. buttondown
  3606. buttondown
  3607. checkDevice
  3608. status cdAudio mode
  3609. tbkMCIchk
  3610. set cdAudio door closed
  3611. tbkMCIchk
  3612. set cdAudio door open
  3613. tbkMCIchk
  3614. Videodisc:  Simple Controls
  3615.  >"l#
  3616. The Driver On/Off switch  opens  and 
  3617.  closes  the device and initializes the disc.  The slider position, as well as the track and position fields, are updated by an  idle  handler which queries the status of the videodisc driver.  You could also use timer services provided by the tbkTimer functions to update those at a rate over which you will have much more control.
  3618. The  slider's main script  is in the system book TBKMM.SBK.  If you change any of the  local scripts  in the slider, be sure to forward the button event messages for which you write or modify the handlers.
  3619. Most of the widgets on this page require this page's script.  Each button control sends a  checkDevice  message. The checkDevice handler in the page script makes sure the driver switch has been turned on. Status fields are update by the page script's idle handler.  
  3620. e correctly.  r background where you paste these elements if you want them to update correctly.  
  3621. editScript "
  3622. tbkMCIchk(""
  3623. videodisc shareable""", 
  3624. "Driver switch"
  3625. buttonDown
  3626. buttonDown
  3627. editScript
  3628. get tbkMCIchk("open videodisc shareable"
  3629. Driver switch
  3630. editScript "
  3631. tbkmci(""close videodisc""", 
  3632. "Driver switch"
  3633. buttonDown
  3634. buttonDown
  3635. editScript
  3636. get tbkmci("close videodisc"
  3637. Driver switch
  3638. editScript "
  3639. buttondown
  3640. buttondown
  3641. editScript
  3642. to handle idle
  3643. editScript "
  3644. |", tbkmmsbk()
  3645. buttonDown
  3646. buttonDown
  3647. editScript
  3648. to handle buttonStillDown
  3649. tbkmmsbk
  3650. editScript "
  3651. tbkmci(""play videodisc", 
  3652. B"Videodisc Position Thumb"
  3653. buttonDown
  3654. buttonDown
  3655. editScript
  3656. get tbkmci("play videodisc
  3657. Videodisc Position Thumb
  3658.  s_device :  a system variable used in the idle handler to bypass status queries.
  3659.  s_idle :  a system variable use to count idle messages.
  3660.  s_prompt : a system variable containing the last value entered when prompting for the play from/to positions.
  3661.  s_MediaType : a system variable inidicating that the videodisc is CAV or CLV format.
  3662.  s_pos : a system variable containing the current position of the disc in milliseconds while scanning forward.
  3663.  s_vLength : a system variable containing the length of the disc in milliseconds while scanning forward.
  3664. editScript "
  3665. s_device", 
  3666. "driver switch"
  3667. buttonDown
  3668. buttonDown
  3669. editScript
  3670. set s_device
  3671. driver switch
  3672. editScript "
  3673. us_idle", 
  3674. buttonDown
  3675. buttonDown
  3676. editScript
  3677. decrement s_idle
  3678. editScript "
  3679. tbkMCIchk(""play videodisc 
  3680. "" && s_prompt", 
  3681. buttonUp
  3682. buttonUp
  3683. editScript
  3684. get tbkMCIchk("play videodisc from" && s_prompt
  3685. play from
  3686. editScript "
  3687. s_mediaType 
  3688. tbkMCIchk(""status videodisc 
  3689. % type", 
  3690. B"Reverse Scan"
  3691. buttonDown
  3692. buttonDown
  3693. editScript
  3694. set s_mediaType to tbkMCIchk("status videodisc media type
  3695. Reverse Scan
  3696. editScript "
  3697. s_pos 
  3698. tbkMCI(""status videodisc 
  3699. B"Forward Scan"
  3700. buttonDown
  3701. buttonDown
  3702. editScript
  3703. set s_pos to tbkMCI("status videodisc position
  3704. Forward Scan
  3705. editScript "
  3706. s_vLength 
  3707. tbkMCI(""status videodisc length", 
  3708. B"Forward Scan"
  3709. buttonDown
  3710. buttonDown
  3711. editScript
  3712. set s_vLength to tbkMCI("status videodisc length
  3713. Forward Scan
  3714. Videodisc
  3715. Simple Controlse controls
  3716. Position:
  3717. Track: : rack: 
  3718. txclassname
  3719. 3DFrame Recessed
  3720. Change Speed   
  3721. Length:
  3722. Driver On/Off
  3723. Driver switch
  3724. 4s_device
  3725. Zswitch, x
  3726. -(y1, 
  3727. "off"
  3728. tbkMCI("stop videodisc wait","")
  3729. --use 
  3730. asure 
  3731. worked
  3732. <close 
  3733. 7","")
  3734. 0,50.1875,0
  3735. tbkMCIchk("
  3736. shareable","",1,1)
  3737. buttonUp
  3738. buttonUp
  3739. false
  3740. stop videodisc wait
  3741. tbkMCI
  3742. close videodisc
  3743. tbkMCI
  3744. open videodisc shareable
  3745. tbkMCIchk
  3746. videodisc
  3747. 120,50,100
  3748. switch
  3749. s_device
  3750. txclassname
  3751. vSwitchHandle
  3752. Scan rt 
  3753. Play     
  3754. Step rt 
  3755. Pause t 
  3756. Step rt 
  3757. Play rt 
  3758. Scan rt 
  3759. checkDevice TRUE
  3760. tbkMCIchk("play videodisc reverse","",1,1)
  3761. updateSlider "
  3762. buttonUp
  3763. buttonUp
  3764. checkDevice
  3765. play videodisc reverse
  3766. tbkMCIchk
  3767. updateSlider
  3768. reverse
  3769. checkDevice TRUE
  3770. tbkMCIchk("
  3771. videodisc reverse","",1,1)
  3772. updateSlider "still"
  3773. buttonDown
  3774. buttonStillDown
  3775. buttonDown
  3776. checkDevice
  3777. buttonStillDown
  3778. step videodisc reverse
  3779. tbkMCIchk
  3780. updateSlider
  3781. still
  3782. checkDevice TRUE
  3783. tbkMCIchk("
  3784. videodisc","",1,1)
  3785. updateSlider "still"
  3786. buttonUp
  3787. buttonUp
  3788. checkDevice
  3789. pause videodisc
  3790. tbkMCIchk
  3791. updateSlider
  3792. still
  3793. checkDevice TRUE
  3794. tbkMCIchk("
  3795. videodisc","",1,1)
  3796. updateSlider "still"
  3797. buttonDown
  3798. buttonStillDown
  3799. buttonDown
  3800. checkDevice
  3801. buttonStillDown
  3802. step videodisc
  3803. tbkMCIchk
  3804. updateSlider
  3805. still
  3806. checkDevice TRUE
  3807. tbkMCI("play videodisc","")
  3808. updateSlider "
  3809. buttonUp
  3810. buttonUp
  3811. checkDevice
  3812. play videodisc
  3813. tbkMCI
  3814. updateSlider
  3815. forward
  3816. Forward Scan
  3817. Reverse Scan
  3818. 4s_MediaType
  3819. checkDevice TRUE
  3820. s_mediaType 
  3821. tbkMCIchk("status videodisc 
  3822. $ type","",1,1)
  3823. "CAV"
  3824. :("play 
  3825. 1reverse scan","")
  3826. 4s_pos
  3827. ms","")
  3828. ","")
  3829. ` > 0
  3830. H1000
  3831. HMSFromMillisec(
  3832. ","")
  3833. updateSlider "
  3834. " && 
  3835. ,"",1)
  3836. ","")
  3837. uttonDown
  3838. buttonStillDown
  3839. buttonDown
  3840. buttonUp
  3841. buttonDown
  3842. checkDevice
  3843. s_mediaType
  3844. status videodisc media type
  3845. tbkMCIchk
  3846. play videodisc reverse scan
  3847. tbkMCI
  3848. set videodisc time format ms
  3849. tbkMCI
  3850. status videodisc position
  3851. tbkMCI
  3852. s_pos
  3853. s_MediaType
  3854. buttonStillDown
  3855. position
  3856. HMSFromMillisec
  3857. s_pos
  3858. s_MediaType
  3859. buttonUp
  3860. play videodisc reverse
  3861. tbkMCI
  3862. updateSlider
  3863. reverse
  3864. play videodisc from
  3865. tbkMCIchk
  3866. set videodisc time format HMS
  3867. tbkMCI
  3868. updateSlider
  3869. forward
  3870. s_pos
  3871. s_MediaType
  3872. checkDevice TRUE
  3873. tbkMCIchk("seek videodisc 
  3874. 0","",1,1)
  3875. buttonUp
  3876. buttonUp
  3877. checkDevice
  3878. seek videodisc to 0
  3879. tbkMCIchk
  3880. checkDevice TRUE
  3881. tbkMCIchk("stop videodisc","",1,1)
  3882. buttonUp
  3883. buttonUp
  3884. checkDevice
  3885. stop videodisc
  3886. tbkMCIchk
  3887. Restart 
  3888. Stop rt 
  3889. Play From
  3890. 4s_prompt
  3891. checkDevice TRUE
  3892. ("Play 
  3893. where?" & 
  3894. & "(Examples:" && 
  3895. & 1234 & 
  3896. & ")" 
  3897. tbkMCIchk("play videodisc 
  3898. " && 
  3899. ,"",1,1)
  3900. updateSlider "
  3901. buttonUp
  3902. buttonUp
  3903. checkDevice
  3904. Play from where?
  3905. (Examples:
  3906. play videodisc from
  3907. tbkMCIchk
  3908. updateSlider
  3909. forward
  3910. s_prompt
  3911. Play To
  3912. 4s_prompt
  3913. checkDevice TRUE
  3914. ("Play 
  3915. where?" & 
  3916. & "(Example:" && 
  3917. & 1234 & 
  3918. &")" 
  3919. tbkMCIchk("play videodisc 
  3920. " && 
  3921. ,"",1,1)
  3922. 0("status 
  3923. ","")
  3924. updateSlider "reverse"
  3925. buttonUp
  3926. buttonUp
  3927. checkDevice
  3928. Play to where?
  3929. (Example:
  3930. cancel
  3931. play videodisc to
  3932. tbkMCIchk
  3933. status videodisc position
  3934. tbkMCI
  3935. updateSlider
  3936. reverse
  3937. updateSlider
  3938. forward
  3939. s_prompt
  3940. Play From To
  3941. 4s_prompt
  3942. checkDevice TRUE
  3943. ("Play 
  3944. where 
  3945. ?" & 
  3946. & "(Example:" && 
  3947. & "1234 
  3948. 1345" & 
  3949. & ")" 
  3950. xisNumber(ep)
  3951. tbkMCIchk("play videodisc 
  3952. " && sp && "
  3953. " && ep,"",1,1)
  3954. ep < sp
  3955. updateSlider "reverse"
  3956. buttonUp
  3957. buttonUp
  3958. checkDevice
  3959. Play from where to where?
  3960. (Example:
  3961. 1234 to 1345
  3962. isNumber
  3963. play videodisc from
  3964. tbkMCIchk
  3965. updateSlider
  3966. reverse
  3967. updateSlider
  3968. forward
  3969. s_prompt
  3970. Play From....
  3971. Play To...  
  3972. Play FromTo...
  3973. Videodisc Speed Control
  3974. 9txClassName
  3975. Slider
  3976. checkDevice TRUE
  3977. tbkMCI("capability videodisc 
  3978. play rate","")
  3979. SliderPosition 
  3980. - .5 
  3981. p < -.02 
  3982. p > .02
  3983. s","")
  3984. status 
  3985. media type","") <> "CLV"
  3986. (p * 2 * 
  3987. p < 0
  3988. reverse speed" && 
  3989. <,"")
  3990. Y,"")
  3991. p < 0
  3992. U","")
  3993. ","")
  3994. buttonUp
  3995. buttonUp
  3996. checkDevice
  3997. capability videodisc fast play rate
  3998. tbkMCI
  3999. SliderPosition
  4000. SliderPosition
  4001. pause videodisc
  4002. tbkMCI
  4003. status videodisc media type
  4004. tbkMCI
  4005. play videodisc reverse speed
  4006. tbkMCI
  4007. play videodisc speed
  4008. tbkMCI
  4009. play videodisc reverse
  4010. tbkMCI
  4011. play videodisc
  4012. tbkMCI
  4013. >width
  4014. >glide
  4015. group id 80 of page id 0
  4016. .?txClassName
  4017. hSliderThumb
  4018. Button
  4019. position slider
  4020. 0.7447222222222222
  4021. Videodisc Position Thumb
  4022. T@H@defStrokeColor
  4023. 0,0,0
  4024. l@b@width
  4025. @z@glide
  4026. line id 69 of page id 0
  4027. @defFillColor
  4028. 0,100,0
  4029. @txClassName
  4030. HSliderThumb
  4031. checkDevice TRUE
  4032. tbkMCI("status videodisc mode","") 
  4033. tbkMCIchk("
  4034. 'door closed","",1)
  4035. ","",1)
  4036. buttonUp
  4037. buttonUp
  4038. checkDevice
  4039. status videodisc mode
  4040. tbkMCI
  4041. set videodisc door closed
  4042. tbkMCIchk
  4043. set videodisc door open
  4044. tbkMCIchk
  4045. Eject t 
  4046. Track
  4047. Position
  4048. Length
  4049. editScript "
  4050. checkDevice", 
  4051. buttonDown
  4052. buttonDown
  4053. editScript
  4054. to handle checkDevice
  4055. Using The Cover Routines
  4056. Videodisc:  Status
  4057. "CapabilityResults"
  4058. "StatusResults"
  4059. leavePage
  4060. leavePage
  4061. CapabilityResults
  4062. StatusResults
  4063. To use these status panels in your application, copy all the objects on this page and examine the script of the Update buttons.  
  4064. How it works:  The button script simply walks through the  textlines  of the Capability and Status fields and queries the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status results fields. 
  4065. editScript "
  4066. B"update capability"
  4067. buttonDown
  4068. buttonDown
  4069. editScript
  4070. step i from 1 to textLineCount(it)
  4071. update capability
  4072. Videodisc
  4073. Capability and Statususnd Status
  4074. txclassname
  4075. 3DFrame Recessed
  4076. capability
  4077. Device type
  4078. Can record
  4079. Has audio
  4080. Has video
  4081. Compound device
  4082. Uses files
  4083. Can Reverse
  4084. Normal play rate
  4085. Fast play rate
  4086. Slow play rate
  4087. Can reverse CLV
  4088. Fast play rate CLV
  4089. Slow play rate CLV
  4090. capabilityResults
  4091. Capabilityes
  4092. Capabilityes
  4093. txclassname
  4094. 3DFrame Recessed
  4095. status
  4096. Media Type
  4097. Number of tracks
  4098. Current track
  4099. Length
  4100. Media present
  4101. Position
  4102. Ready
  4103. Time format
  4104. Status
  4105. Status
  4106. statusResults
  4107. Update capability
  4108. Zcapability
  4109. "capabilityResults"
  4110. tbkMCI("
  4111. videodisc shareable","")
  4112. 9" && 
  4113. ,"") & \
  4114.             CRLF 
  4115. mclose 
  4116. k","")
  4117. buttonDown
  4118. buttonDown
  4119. capabilityResults
  4120. open videodisc shareable
  4121. tbkMCI
  4122. capability
  4123. capability videodisc
  4124. tbkMCI
  4125. close videodisc
  4126. tbkMCI
  4127. capabilityResults
  4128. capability
  4129. Update Capability
  4130. Update Status
  4131. Zstatus
  4132. tbkMCI("
  4133. videodisc shareable","")
  4134. 9" && 
  4135. ,"") & \
  4136.             CRLF 
  4137. mclose 
  4138. k","")
  4139. statusResults
  4140. buttonDown
  4141. buttonDown
  4142. open videodisc shareable
  4143. tbkMCI
  4144. status
  4145. status videodisc
  4146. tbkMCI
  4147. close videodisc
  4148. tbkMCI
  4149. statusResults
  4150. status
  4151. Update Status
  4152. Videodisc: Status
  4153. Videodisc:  Status
  4154. Wave Audio:  Simple Controls
  4155. B"Unload"
  4156. --update the 
  4157. tbkMCI("status waveFile 
  4158. ","")
  4159. "Name" 
  4160. "Length"
  4161. "Position"
  4162. sliderPosition 
  4163. "Slider" 
  4164. "length"
  4165. yieldApp()
  4166. leavepage
  4167. leavepage
  4168. buttonDown
  4169. Unload
  4170. status waveFile position
  4171. tbkMCI
  4172. Length
  4173. Position
  4174. Slider
  4175. sliderPosition
  4176. position
  4177. position
  4178. slider
  4179. sliderPosition
  4180. length
  4181. yieldApp
  4182. These widgets open a wave file and play all or parts of it.  These controls work only if a wave file has been opened.  To start, click the Load button to load a file from the disc and open the wave audio driver.  The Load button 
  4183.  opens  the device and a wave file, and the Unload button  closes  them.  An 
  4184.  idle  handler updates the Position field by querying the status of the wave audio driver.
  4185. The main  slider control's script  is in the system book TBKMM.SBK.  The thumb button's script  seeks  to a new position in the wave file.  If you change the script of the thumb button, be sure to forward the button event messages.
  4186. The Position field and the slider require this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.   ctly.  f you copy these fields, you need to use this page's idle handler.
  4187. editScript "
  4188. tbkmcichk(""
  4189. B"Load"
  4190. buttonDown
  4191. buttonDown
  4192. editScript
  4193. get tbkmcichk("open
  4194. editScript "
  4195. tbkmci(""close", 
  4196. B"Unload"
  4197. buttonDown
  4198. buttonDown
  4199. editScript
  4200. get tbkmci("close
  4201. Unload
  4202. editscript "
  4203. buttonDown
  4204. buttonDown
  4205. editscript
  4206. to handle idle
  4207. editScript "
  4208. |", tbkmmsbk()
  4209. buttonDown
  4210. buttonDown
  4211. editScript
  4212. to handle buttonStillDown
  4213. tbkmmsbk
  4214. editScript "
  4215. tbkMCIchk(""seek", 
  4216. B"thumb"
  4217. buttonDown
  4218. buttonDown
  4219. editScript
  4220. get tbkMCIchk("seek
  4221. thumb
  4222.  waveFile : an alias for the wave file..
  4223. editScript "alias waveFile", 
  4224. B"Load"
  4225. buttonDown
  4226. buttonDown
  4227. editScript
  4228. alias waveFile
  4229. Wave Audio
  4230. Simple Controls controlsmpound controlstrols
  4231. Restart
  4232.  rack 
  4233. Rewind  
  4234. Pause t 
  4235. Play rt 
  4236. FF n rt 
  4237. Unload  
  4238. Play From....
  4239. Play To...  
  4240. Play FromToo.
  4241. Length
  4242. Position
  4243. Position:  ition: 
  4244. Length: onds: e:  
  4245. txclassname
  4246. 3DFrame Recessed
  4247. Wave File: s: e:  
  4248. slider
  4249. txClassName
  4250. Slider
  4251. thumb
  4252. --thumb 
  4253. seek animation file 
  4254. slider's 
  4255. tbkMCIchk("status waveFile length","",1,1)
  4256. sliderPosition 
  4257. " && 
  4258. ,"",1)
  4259. buttonUp
  4260. buttonUp
  4261. status waveFile length
  4262. tbkMCIchk
  4263. sliderPosition
  4264. seek waveFile to
  4265. tbkMCIchk
  4266. txClassName
  4267. HSliderThumb
  4268. defFillColor
  4269. 0,100,0
  4270. glide
  4271. line id 105 of page id 9
  4272. width
  4273. defStrokeColor
  4274. 0,0,0
  4275. Stop  t 
  4276. ZfileName
  4277. a wave 
  4278. OpenDlg(".", "*.
  4279. ", "Please choose a 
  4280. D.", "Choose Wave File")
  4281.     --close old 
  4282. B"Unload"
  4283. tbkMCIchk("
  4284. " && 
  4285.  && "alias waveFile","",1,1)
  4286. ms","",1)
  4287. "length" 
  4288. astatus 
  4289. ,"",1)
  4290. buttonDown
  4291. buttonDown
  4292. *.wav
  4293. Please choose a wave file.
  4294. Choose Wave File
  4295. OpenDlg
  4296. buttonDown
  4297. Unload
  4298. alias waveFile
  4299. tbkMCIchk
  4300. set waveFile time format ms
  4301. tbkMCIchk
  4302. length
  4303. status waveFile length
  4304. tbkMCIchk
  4305. fileName
  4306. Restart
  4307. tbkMCIchk("seek waveFile 
  4308. 0","",1)
  4309. buttonDown
  4310. buttonDown
  4311. seek waveFile to 0
  4312. tbkMCIchk
  4313. Rewind
  4314. tbkMCIchk("status waveFile 
  4315. ","",1,1)
  4316. b(0, p - 100)
  4317. :eek 
  4318. " && p,"",1)
  4319. buttonStillDown
  4320. buttonStillDown
  4321. status waveFile position
  4322. tbkMCIchk
  4323. seek waveFile to
  4324. tbkMCIchk
  4325. Pause
  4326. tbkMCIchk("
  4327. waveFile","",1)
  4328. buttonDown
  4329. buttonDown
  4330. pause waveFile
  4331. tbkMCIchk
  4332. tbkMCIchk("stop waveFile","",1)
  4333. 0","",1)
  4334. buttonDown
  4335. buttonDown
  4336. stop waveFile
  4337. tbkMCIchk
  4338. seek waveFile to 0
  4339. tbkMCIchk
  4340. tbkMCIchk("play waveFile","",1)
  4341. yieldApp()
  4342. buttonDown
  4343. buttonDown
  4344. play waveFile
  4345. tbkMCIchk
  4346. yieldApp
  4347. tbkMCIchk("status waveFile" && "
  4348. ","",1,1)
  4349. "Length", p + 100)
  4350. Jeek 
  4351. " && p,"",1)
  4352. buttonStillDown
  4353. buttonStillDown
  4354. status waveFile
  4355. position
  4356. tbkMCIchk
  4357. Length
  4358. seek waveFile to
  4359. tbkMCIchk
  4360. Unload
  4361. --close the wave file
  4362. tbkMCI("
  4363.  waveFile","")
  4364. buttonDown
  4365. buttonDown
  4366. close waveFile
  4367. tbkMCI
  4368. Play From
  4369. ("Play 
  4370. tbkMCIchk("play waveFile 
  4371. " && 
  4372. ,"",1)
  4373. yieldApp()
  4374. buttonDown
  4375. buttonDown
  4376. Play from
  4377. play waveFile from
  4378. tbkMCIchk
  4379. yieldApp
  4380. Play To
  4381. "Length"
  4382. ("Play 
  4383. tbkMCIchk("play waveFile 
  4384. " && 
  4385. ,"",1)
  4386. yieldApp()
  4387. buttonDown
  4388. buttonDown
  4389. Length
  4390. Play to
  4391. play waveFile from 0 to
  4392. tbkMCIchk
  4393. yieldApp
  4394. Play From To
  4395. "Length"
  4396. ("Play 
  4397. f"0," & 
  4398. tbkMCIchk("play waveFile 
  4399. " && 
  4400.             && 
  4401. ,"",1)
  4402. yieldApp()
  4403. buttonDown
  4404. buttonDown
  4405. Length
  4406. Play from, to
  4407. play waveFile from
  4408. tbkMCIchk
  4409. yieldApp
  4410. Bitmap Graphics:  A Bitmap Index
  4411. You can copy and paste the Generic Bitmap Index Widget into your own application.   Right click  its scroll bar to assign it a series of bitmaps to display.  You'll be prompted for a file name.  The file names must end in a number.  Choose the highest numbered one in a series of similarly-named bitmaps.  For example choose IX16.DIB when the bitmap names start with IX1.DIB and end with IX16.DIB. 
  4412. How it works:  These widgets are actually text fields containing CRLFs.  They work by hiding and showing bitmaps when they receive a  textScrolled  message.
  4413. ToolBook's dialog DLL,  TBKDLG.DLL , needs to be linked for the generic widget's rightButtonUp handler to workkkttonUp handler to work "fileName".me".named ix1.dib through ix20.dib.  It can be copied and pasted into any page.  
  4414. nto any page.  
  4415. y page.  
  4416. with bitmaps named ix1.dib through ix20.dib.  It can be copied and pasted into any page.  
  4417. ose bitmaps as they're shown and hidden.maps as they're shown and hidden.tmaps as they're shown and hidden. and hidden..tmaps as they're shown and hidden..
  4418. editScript "
  4419. "bitmapIndex"
  4420. buttonDown
  4421. buttonDown
  4422. editScript
  4423. to handle rightButtonUp
  4424. bitmapIndex
  4425. editScript "
  4426. textScrolled", 
  4427. "bitmapIndex"
  4428. buttonDown
  4429. buttonDown
  4430. editScript
  4431. to handle textScrolled
  4432. bitmapIndex
  4433.  s_fileName : a system variable used to cache the non-numeric portion of the bitmaps' file names.
  4434.  s_ext : a system variable used to cache the extension portion of the bitmaps' file names.
  4435.  s_x : a system variable containing the x coordinate of the bitmap window.
  4436.  s_y : a system variable containing the y coordinate of the bitmap window.
  4437.  s_last : a system variable containing the alias of the most recently opened bitmap.
  4438.  s_path : a system variable used by the custom index containing this book's path.
  4439. editScript "
  4440. s_fileName", 
  4441. "bitmapIndex"
  4442. buttonDown
  4443. buttonDown
  4444. editScript
  4445. set s_fileName
  4446. bitmapIndex
  4447. editScript "
  4448. s_ext", 
  4449. "bitmapIndex"
  4450. buttonDown
  4451. buttonDown
  4452. editScript
  4453. set s_ext
  4454. bitmapIndex
  4455. editScript "
  4456. ox", 
  4457. "bitmapIndex"
  4458. buttonDown
  4459. buttonDown
  4460. editScript
  4461. set s_x to my x
  4462. bitmapIndex
  4463. editScript "
  4464. oy", 
  4465. "bitmapIndex"
  4466. buttonDown
  4467. buttonDown
  4468. editScript
  4469. set s_y to my y
  4470. bitmapIndex
  4471. editScript "
  4472. s_last 
  4473. ""ix"" & num", 
  4474. "bitmapIndex"
  4475. buttonDown
  4476. buttonDown
  4477. editScript
  4478. set s_last to "ix" & num
  4479. bitmapIndex
  4480. editScript "
  4481. tbkBitmapchk(""
  4482. "" && s_path", 
  4483. "toolbookIndex"
  4484. buttonDown
  4485. buttonDown
  4486. editScript
  4487. get tbkBitmapchk("open" && s_path
  4488. toolbookIndex
  4489. Bitmap Graphics
  4490. A Bitmap Indexess(ToolBook extension)
  4491.  $ A custom bitmap index widget.
  4492. Scroll this field to see how a  bitmap index works......a bitmap to close it...
  4493. toolBookIndex
  4494. frames
  4495. extension
  4496. bitmapIndex
  4497. extension
  4498. frames
  4499. A generic bitmap index widget. &
  4500. Assign your own series of thumbnail bitmaps to this field by right clicking it..s field. 
  4501. txclassname
  4502. 3DFrame Recessed
  4503. MIDI Sequencer:  MIDI To Wave
  4504. cd Audio:  Track Selector
  4505. Wave Audio:  Wave File Buttons
  4506. tbkMCI("close waveFile","")
  4507. enterPage
  4508. leavePage
  4509. enterPage
  4510. leavePage
  4511. close waveFile
  4512. tbkMCI
  4513. The Play and Wait, and Play and Notify buttons open, play and close a wave file determined by their fileName user property.  To play a wave file in your own application, copy either of these buttons to your book and  right click 
  4514. them in Reader mode.  You'll be prompted to enter the name of a wave file.  That name will be stored in the button's fileName user property and played when you click it.
  4515. The Play and Wait button's buttonDown handler opens, plays and closes its wave file using the  wait  parameter.  This delays subsequent OpenScript statements from executing until the wave  file finishes playing and closes.
  4516. 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.
  4517. The start up time for a wave file can be greatly reduced by opening it in an enterPage handler instead of in the button script where it's actually played.d of in the button script where it's actually played.
  4518. editScript "
  4519. B"Play 
  4520. Wait"
  4521. buttonDown
  4522. buttonDown
  4523. editScript
  4524. to handle rightButtonUp
  4525. Play and Wait
  4526. editScript "wait", 
  4527. B"Play 
  4528. Wait"
  4529. buttonDown
  4530. buttonDown
  4531. editScript
  4532. Play and Wait
  4533. editScript "
  4534. B"Play And Notify"
  4535. buttonDown
  4536. buttonDown
  4537. editScript
  4538. Play And Notify
  4539.  waveFile : an alias for wave files used in these buttons.Wait, and Play And Notify buttons.. wave files.
  4540. editScript "alias waveFile", 
  4541. B"Play And Wait"
  4542. buttonDown
  4543. buttonDown
  4544. editScript
  4545. alias waveFile
  4546. Play And Wait
  4547. Wave Audio
  4548. Generic Wave Buttonss
  4549. Play and Wait
  4550. ofileName
  4551. tbkMCI("status wavefile mode","") 
  4552. c"play"
  4553. ,close waveFile","")
  4554. tbkMCIchk("
  4555. " && 
  4556. { && "alias 
  4557. 5,1,1)
  4558. E wait","",1)
  4559. --prompt 
  4560. OpenDlg(".", "*.
  4561. ", "Choose a 
  4562. B.", "
  4563. Wave 
  4564. buttonDown
  4565. rightButtonUp
  4566. buttonDown
  4567. fileName
  4568. prightButtonUp
  4569. status wavefile mode
  4570. tbkMCI
  4571. close waveFile
  4572. tbkMCI
  4573. fileName
  4574. alias waveFile
  4575. tbkMCIchk
  4576. play waveFile wait
  4577. tbkMCIchk
  4578. close waveFile
  4579. tbkMCIchk
  4580. rightButtonUp
  4581. *.wav
  4582. Choose a wave file for this button.
  4583. Choose Wave File
  4584. OpenDlg
  4585. fileName
  4586. fileName
  4587. Play and Wait
  4588. Play and Notify
  4589. ofileName
  4590. tbkMCI("close waveFile","")
  4591. tbkMCIchk("
  4592. " && 
  4593. M && "alias 
  4594. /,1,1)
  4595. )play 
  4596. tbkmmNotify
  4597. lstatus 
  4598. g mode","")
  4599. c"stop" 
  4600. OpenDlg(".", "*.
  4601. ", "Choose a 
  4602. B.", "
  4603. Wave 
  4604. uttonDown
  4605. tbkmmNotify
  4606. buttonDown
  4607. rightButtonUp
  4608. buttonDown
  4609. fileName
  4610. prightButtonUp
  4611. close waveFile
  4612. tbkMCI
  4613. fileName
  4614. alias waveFile
  4615. tbkMCIchk
  4616. play waveFile
  4617. tbkMCIchk
  4618. tbkmmNotify
  4619. status waveFile mode
  4620. tbkMCI
  4621. pause
  4622. close waveFile
  4623. tbkMCI
  4624. rightButtonUp
  4625. *.wav
  4626. Choose a wave file for this button.
  4627. Choose Wave File
  4628. OpenDlg
  4629. fileName
  4630. fileName
  4631. Play and Notify
  4632. Using The Cover Routines
  4633. Using tbkMCIchk() and tbkBitmapChk().................
  4634. The Multimedia Resource Kit sysbook, tbkmm.sbk, contains two OpenScript functions that serve as cover routines for calls to tbkMCI( ) and tbkBitmap( ).   They are 
  4635.  tbkMCIchk( )  and
  4636.  tbkBitmapChk( ) .  The widgets in this book use these cover routines extensively to do the following things.
  4637. * Automatically initialize sysErrorNumber to zero before function calls.
  4638.  call.
  4639. editScript "
  4640. tbkMCIchk", tbkmmsbk()
  4641. buttonUp
  4642. buttonUp
  4643. editScript
  4644. to get tbkMCIchk
  4645. tbkmmsbk
  4646. editScript "
  4647. tbkBitmapchk", tbkmmsbk()
  4648. buttonUp
  4649. buttonUp
  4650. editScript
  4651. to get tbkBitmapchk
  4652. tbkmmsbk
  4653. * Optionally display the error string from the tbkmmErrorString( ) function 
  4654. in a request dialog box  when sysErrorNumber is not equal to zero after function calls.
  4655. * Optionally break to system and set the cursor to its default when sysErrorNumber is not equal to zero after function calls.
  4656. These functions regularize error checking and reduce 
  4657. the need to write your own error checking code.  They take the same parameters as tbkMCI( ) and tbkBitmap( ), but also two additional ones..es.ional ones...
  4658. The third parameter causes a request dialog box to display error messages.  The fourth parameter sets sysCursor to 1 and breaks to system if an error occurs.  These parameters may take any non-null value.
  4659. A normal call to MCI that plays the CD audio device looks like this:
  4660. The same call using the tbkMCIchk( ) cover routine might look like this:
  4661. er.r.er.er.....atter...
  4662. `    8    ]    
  4663. get tbkMCI("play cdaudio","")
  4664. get tbkMCIchk("play cdaudio","",1,1)
  4665. "When a widget makes several consecutive calls 
  4666. TBKBMP.DLL, the 
  4667.  uses 
  4668. 4 parameters 
  4669. Xcover routine.
  4670. Subsequent 
  4671. 3 only 3 
  4672. l produces 
  4673. error, such 
  4674. ndevice 
  4675. xbeing 
  4676. handler will display 
  4677. 9 message 
  4678. buttonUp
  4679. buttonUp
  4680. When a widget makes several consecutive calls to MCI or to TBKBMP.DLL, the first call uses all 4 parameters with the check cover routine.  Subsequent calls use only 3 parameters.  So if the first call produces an error, such as the device not being open, the handler will display an error message and break to system.
  4681. A Rule Of Thumb...
  4682. Window Styles
  4683. An Explanation of Window Styles
  4684. You can display bitmaps and animation files in  overlapped, popup, or child windows.
  4685. The position of overlapped and popup windows is relative to the screen, and the position of a child window is relative to the ToolBook page.  Position and size are defined in pixels.  You can set the postion of a bitmap's window, and the bounds of an animation window.
  4686. ds of an animation window
  4687. ox or by pressing Alt+F4 when the window has the focus.
  4688. Overlapped windows are drawn on top of the ToolBook window.  They're not clipped to the bounds of the ToolBook window that owns them, and they have their own window controls.
  4689. Popup windows are drawn on top of the ToolBook window like overlapped windows, but they don't have window controls.  
  4690. Child windows are drawn inside the ToolBook window, but on top of the page, and are clipped to the bounds of the ToolBook window.
  4691. The position of overlapped and popup windows is relative to the screen; the position of a child window is relative to the ToolBook page.  Position and size are defined in pixels.
  4692. You can use OpenScript's
  4693.  translateWindowMessage  control structure to receive Window messages in the bitmap window.  This is useful for such things as dismissing a bitmap window by  clicking  the window.n the bitmap window.  This is useful for such things as dismissing a bitmap window by  clicking  the window.
  4694. You can use OpenScript's translateWindowMessage control structure to receive Window messages in a bitmap or animation window.  This is useful for such things as dismissing a window by clicking it.  See the  Simple Bitmap Buttons  page for an example of how to do this.
  4695. Overlapped windows require that you trap a Close message for animation windows and a Destroy message for bitmap windows.  This allows you to close the media file when the overlapped window is closed by pressing Alt+F4.4.
  4696. "Bitmap Graphics:
  4697. Buttons"
  4698. buttonDown
  4699. buttonDown
  4700. Bitmap Graphics:  Bitmap Buttons
  4701. Wave Audio:  Status
  4702. es & Status
  4703. "capabilityResults"
  4704. "statusResults"
  4705. leavePage
  4706. leavePage
  4707. capabilityResults
  4708. statusResults
  4709. The Update buttons' scripts walk through the  textlines  of the Capability and Status fields and query the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status results fields.
  4710. The  Capability  button queries the wave audio device; the  Status  button queries a wave audio file...........ility and Status Results fields.
  4711. The  Capability  button queries the wave audio device; the  Status  button queries a wave audio file.m, and finally uses the text again as the name of the field in which to put the item value...
  4712. editScript "
  4713. B"update capability"
  4714. buttonDown
  4715. buttonDown
  4716. editScript
  4717. step i from 1 to textLineCount(it)
  4718. update capability
  4719. editscript "tbkMCI(""capability", 
  4720. B"Update Capability"
  4721. buttonDown
  4722. buttonDown
  4723. editscript
  4724. tbkMCI("capability
  4725. Update Capability
  4726. editscript "tbkMCIchk(""status", 
  4727. B"Update Status"
  4728. buttonDown
  4729. buttonDown
  4730. editscript
  4731. tbkMCIchk("status
  4732. Update Status
  4733.  waveFile : an alias for the wave file when displaying status items.
  4734. editscript "alias waveFile", 
  4735. B"Update Status"
  4736. buttonDown
  4737. buttonDown
  4738. editscript
  4739. alias waveFile
  4740. Update Status
  4741. Wave Audio
  4742. Capability and Statusus
  4743.     txclassname
  4744. 3DFrame Recessed
  4745. Status
  4746. Status
  4747. status
  4748. Ready
  4749. Channels
  4750. Length
  4751. Position
  4752. Format tag
  4753. Alignment
  4754. BitsPerSample
  4755. SamplesPerSec
  4756. Number of tracks
  4757. Current trackt track
  4758. Current track
  4759. statusResults
  4760. capability
  4761. Can record
  4762. Device type
  4763. Has audio
  4764. Has video
  4765. Compound device
  4766. Uses files
  4767. Outputs
  4768. Inputs
  4769. Capabilityes
  4770. Capabilityes
  4771. capabilityResults
  4772. Update capability
  4773. Zcapability
  4774. "capabilityResults"
  4775. tbkMCI("
  4776. waveaudio shareable","")
  4777.     --loop through the 
  4778. R" && 
  4779. ,"") & \
  4780.             CRLF 
  4781. close 
  4782. ","")
  4783. buttonDown
  4784. buttonDown
  4785. capabilityResults
  4786. open waveaudio shareable
  4787. tbkMCI
  4788. capability
  4789. capability waveaudio
  4790. tbkMCI
  4791. close waveaudio
  4792. tbkMCI
  4793. capabilityResults
  4794. capability
  4795. Update Capability
  4796. Update Status
  4797. Zstatus
  4798. "statusResults"
  4799. OpenDlg(".", "*.wav", "Choose a wave file.", "
  4800. Wave File")
  4801. tbkMCIchk("
  4802. " && 
  4803. && "alias waveFile","",1,1)
  4804. 2 && 
  4805. ,"",1) & \
  4806.             CRLF 
  4807. {("close 
  4808. buttonDown
  4809. buttonDown
  4810. statusResults
  4811. *.wav
  4812. Choose a wave file.
  4813. Choose Wave File
  4814. OpenDlg
  4815. statusResults
  4816. alias waveFile
  4817. tbkMCIchk
  4818. status
  4819. status waveFile
  4820. tbkMCIchk
  4821. close waveFile
  4822. tbkMCI
  4823. statusResults
  4824. status
  4825. fileName
  4826. D:\MM\WIDGET\bells.wav
  4827. Update Status
  4828. Wave Audio:  Status
  4829. Widget Dependencies
  4830. About This Widget Book
  4831. noAutoName
  4832. About this Widget Book(Please read this))))
  4833. Widget:  A small contrivance.
  4834. 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.
  4835. When the devices and drivers are available, the widgets in this book are fully functional.  Some require data files.
  4836. e pasted a widget, you can..............................................
  4837. You can use the widgets in several ways:  
  4838. * 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.
  4839. * Copy widgets and control panels, then paste them into your applications.  You can modify them to suit your particular requirements.
  4840. * Use widget scripts as examples for your own scripts.
  4841. dia extensions to ToolBook.  Most widgets are directly MCI-compatible.
  4842. -compatible.
  4843. ompatible.
  4844. irectly MCI-compatible.
  4845. * You can use the widget book to exercise the system.
  4846. * Use the widget book to exercise the system.
  4847. * 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.
  4848. 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.
  4849. About this Widget Book
  4850. raphics: Dynamic Bitmap
  4851. Window Styles
  4852. Bitmap Graphics:  Bitmap Buttons
  4853.     --close bitmap that might be 
  4854. tbkBitmap("
  4855. )dibFile")
  4856. leavePage
  4857. leavePage
  4858. close dibFile
  4859. tbkBitmap
  4860. close
  4861. The Multimedia Resource Kit's bitmap DLL, TBKBMP.DLL lets you display bitmaps in their own windows.  See the
  4862.  Window Styles  reference page to learn about different types of windows.
  4863. Click the Hard Coded Example buttons to see examples of 256 color device independent bitmaps in 3 window styles.  To display a bitmap in your own application, copy a Generic button to your book and  right click  it in Reader mode.  You'll be prompted for a file name.  That file name will be stored as a user property of the button.  You can also assign the position of the bitmap's window.
  4864. To close the bitmap after it's displayed, click it, or in the case of the overlapped window, close its window by pressing Alt+F4.  These buttons use the 
  4865.  translateWindowMessage  control structure to trap mouse clicks in the bitmap window, which sends a ToolBook message to close the bitmap file.  The Ovelapped button also traps a windows  destroy  message..smissing a bitmap window by  clicking  the window..e bitmap window.  This is useful for such things as dismissing a bitmap window by  clicking  the window..
  4866. eStyles"
  4867. buttonDown
  4868. buttonDown
  4869. window Styles
  4870. editScript "
  4871. B"generic popup bitmap"
  4872. buttonDown
  4873. buttonDown
  4874. editScript
  4875. to handle rightButtonUp
  4876. generic popup bitmap
  4877. editScript "translatewindowmessage 
  4878. s_bmpHandle", 
  4879. B"generic popup bitmap"
  4880. buttonDown
  4881. buttonDown
  4882. editScript
  4883. translatewindowmessage for s_bmpHandle
  4884. generic popup bitmap
  4885. editScript "
  4886. bmpWindowClose 
  4887. B"generic overlapped bitmap"
  4888. buttonDown
  4889. buttonDown
  4890. editScript
  4891. before 2 send bmpWindowClose to self
  4892. generic overlapped bitmap
  4893.  dibFile : alias for every button's bitmap file.
  4894.  s_Path : a system variable used in the hard coded example buttons that contains the path to this book.
  4895.  s_bmpHandle : a system variable used in the Overlapped button's script containing the handle to the bitmap's window. Overlapped button's bitmap..
  4896. editScript "alias dibFile", 
  4897. "popup"
  4898. buttonDown
  4899. buttonDown
  4900. editScript
  4901. alias dibFile
  4902. popup
  4903. editScript "
  4904. s_path", 
  4905. buttonDown
  4906. buttonDown
  4907. editScript
  4908. set s_path
  4909. editScript "
  4910. s_bmpHandle", 
  4911. B"Generic Overlapped Bitmap"
  4912. buttonDown
  4913. buttonDown
  4914. editScript
  4915. set s_bmpHandle
  4916. Generic Overlapped Bitmap
  4917. Bitmap Graphics (ToolBook extension)
  4918. Generic Bitmap Buttonsstension)
  4919. close
  4920. Click the bitmap's window to close it.
  4921. popup
  4922. :PHYSSIZE
  4923. Popup
  4924. FALSE
  4925.     --close other bitmaps that might be 
  4926. tbkBitmap("
  4927. 0dibFile")
  4928. fa child 
  4929. tbkBitmapchk("
  4930. dib2.
  4931. ; alias dibfile style 
  4932. " && sysClientHandle,1,1)
  4933. 0ate 
  4934. translating 
  4935. emessages 
  4936. bmpHandle 
  4937. status 
  4938.     translatewindowmessage 
  4939. bmpButtonup 
  4940. BMPbuttonUp
  4941. uttonDown
  4942. buttonUp
  4943. buttonDown
  4944. BMPbuttonUp
  4945. buttonDown
  4946. buttonUp
  4947. close dibFile
  4948. tbkBitmap
  4949. open dib2.dib alias dibfile style child parent
  4950. tbkBitmapchk
  4951. window dibfile state show
  4952. tbkBitmapchk
  4953. status dibfile window
  4954. tbkBitmap
  4955. bmpButtonup
  4956. close
  4957. bmpHandle
  4958. BMPbuttonUp
  4959. close dibFile
  4960. tbkBitmap
  4961. close
  4962. :PHYSSIZE
  4963. Child
  4964. v#:PHYSSIZE
  4965. Overlapped
  4966. &$V$b
  4967. j$txclassname
  4968. 3DFrame Recessed
  4969. Hard Coded
  4970. Examples 
  4971. Generic Popup Bitmap
  4972. Popup
  4973. Generic Child Bitmap
  4974. Child
  4975. Generic Overlapped Bitmap
  4976. Overlapped
  4977. r&fileName
  4978. J:\ARIZONA\drt.bmp
  4979. 4s_bmpHandle
  4980. ofileName
  4981. rightButtonup
  4982. B's bitmap 
  4983. fa popup 
  4984. tbkBitmapchk("
  4985. " && 
  4986. d && "alias dibFile style 
  4987. B", 1, 1)
  4988. " && 
  4989. ox & "," & 
  4990. oy,1)
  4991. Rate 
  4992. translating 
  4993. emessages 
  4994. ("status 
  4995.     translatewindowmessage 
  4996. bmpWindowClose 
  4997. bmpButtonup 
  4998. --dismiss 
  4999. they click 
  5000. BMPbuttonUp
  5001.     untranslateAllWindowMessages 
  5002. ("close 
  5003. a timer 
  5004. edirectly (Alt-f4)
  5005. lets 
  5006. efinish closing 
  5007. 4sending a 
  5008.     --which 
  5009. turn sends a bmpButtonDown 
  5010. windows 
  5011. tbkTimerStart("single",500,100,
  5012. tbkMMTimer
  5013. bmpButtonUp
  5014. OpenDlg(".", "*.*", "Choose a 
  5015. (.dib 
  5016.  extensions)", "
  5017. ox & "," & 
  5018. "0,0"
  5019. ("Would you like 
  5020. specify 
  5021. e? If so, please enter 2 numeric coordinates." 
  5022. ) <> 2
  5023. "Invalid 
  5024. x"0" 
  5025. xisNumber(
  5026. "Coordinate 
  5027. z" && i && "
  5028. tonUp
  5029. buttonUp
  5030. bmpWindowClose
  5031. tbkMMTimer
  5032. BMPbuttonUp
  5033. rightButtonUp
  5034. buttonUp
  5035. fileName
  5036. prightButtonup
  5037. fileName
  5038. alias dibFile style popup
  5039. tbkBitmapchk
  5040. window dibFile position
  5041. tbkBitmapchk
  5042. window dibFile state show
  5043. tbkBitmapchk
  5044. status dibFile window
  5045. tbkBitmap
  5046. bmpWindowClose
  5047. bmpButtonup
  5048. s_bmpHandle
  5049. BMPbuttonUp
  5050. close dibFile
  5051. tbkBitmap
  5052. s_bmpHandle
  5053. bmpWindowClose
  5054. single
  5055. tbkTimerStart
  5056. tbkMMTimer
  5057. bmpButtonUp
  5058. rightButtonUp
  5059. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  5060. Choose Bitmap File
  5061. OpenDlg
  5062. fileName
  5063. fileName
  5064. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  5065. cancel
  5066. Invalid number of coordinates.
  5067. isNumber
  5068. Coordinate number
  5069. is not a number.
  5070. CD Audio:  Small Simple Controls
  5071. Animation:  Control Panel
  5072. Generic:  Dog Sliders
  5073. MIDI sequencer:  Simple Controls
  5074. B"Unload"
  5075. --update the 
  5076. tbkMCI("status MIDIFile 
  5077. ","")
  5078. "Name" 
  5079. "Length"
  5080. "Position"
  5081. "Tempo"
  5082. "Max 
  5083. sliderPosition 
  5084. "Slider" 
  5085. "tempoSlider" 
  5086. "length"
  5087. file 
  5088. d","")
  5089. temposlider 
  5090. leavepage
  5091. leavepage
  5092. buttonDown
  5093. Unload
  5094. status MIDIFile position
  5095. tbkMCI
  5096. Length
  5097. Position
  5098. Tempo
  5099. Max Tempo
  5100. Slider
  5101. sliderPosition
  5102. tempoSlider
  5103. sliderPosition
  5104. Position
  5105. Position
  5106. Slider
  5107. sliderPosition
  5108. length
  5109. status MIDIfile tempo
  5110. tbkMCI
  5111. tempo
  5112. tempo
  5113. sliderPosition
  5114. tempo
  5115. Max Tempo
  5116. temposlider
  5117. *n+j,40
  5118. fName
  5119. A:\GYPSCAMP.MID
  5120. These widgets allow you to open a MIDI file and play all or parts of it.  They work only if a MIDI file has been opened .  The Load button  opens  the device and a MIDI file, and the Unload button  closes  them.  An  idle  handler updates the position and tempo fields by querying the status of the MIDI device.  To start, click the Load button to open the MIDI driver and load a MIDI file.
  5121. The  position slider's main script  is in the system book TBKMM.SBK.  The thumb button's script  seeks  to a new position in the MIDI file.  If you change the script of the thumb button, be sure to forward the button event messages.
  5122. The local script of the Tempo slider allows it to  control the tempo .  
  5123. The Position and Tempo fields, and the sliders require this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.  
  5124. editScript "
  5125. tbkmcichk(""
  5126. B"load"
  5127. buttonDown
  5128. buttonDown
  5129. editScript
  5130. get tbkmcichk("open
  5131. editScript "
  5132. tbkmci(""close", 
  5133. B"unload"
  5134. buttonDown
  5135. buttonDown
  5136. editScript
  5137. get tbkmci("close
  5138. unload
  5139. editscript "
  5140. buttonDown
  5141. buttonDown
  5142. editscript
  5143. to handle idle
  5144. editScript "
  5145. |", tbkmmsbk()
  5146. buttonDown
  5147. buttonDown
  5148. editScript
  5149. to handle buttonStillDown
  5150. tbkmmsbk
  5151. editScript "
  5152. tbkMCIchk(""seek", 
  5153. B"thumb"
  5154. buttonDown
  5155. buttonDown
  5156. editScript
  5157. get tbkMCIchk("seek
  5158. thumb
  5159. editScript "
  5160. tbkMCI(""
  5161. midiFile tempo", 
  5162. B"tempoThumb"
  5163. buttonDown
  5164. buttonDown
  5165. editScript
  5166. get tbkMCI("set midiFile tempo
  5167. tempoThumb
  5168.  MIDIfile : an alias used for the current MIDI file..Play and Notify buttons' MIDI files.
  5169.  s_tempoMax :  a system variable used by the tempo slider containing the maximum tempo value for the current MIDI file...
  5170. editScript "alias midiFile", 
  5171. B"Load"
  5172. buttonUp
  5173. buttonUp
  5174. editScript
  5175. alias midiFile
  5176. MIDI Sequencer
  5177. Simple Controlscontrols::::
  5178. Tempo t 
  5179. tempoSlider
  5180. 0.4333333333333333
  5181. txClassName
  5182. Slider
  5183. tempoThumb
  5184. --update the tempo based on 
  5185. slider thumb
  5186. "Max Tempo"
  5187. tbkMCI("
  5188. midiFile 
  5189. * sliderPosition 
  5190. ),"")
  5191. yieldApp()
  5192. buttonStillDown
  5193. buttonStillDown
  5194. Max Tempo
  5195. set midiFile tempo
  5196. sliderPosition
  5197. tbkMCI
  5198. yieldApp
  5199. height
  5200. hilight
  5201. false
  5202. width
  5203. glide
  5204. button id 278 of page id 8
  5205. txClassName
  5206. vSliderThumb
  5207. Restart
  5208.  rack 
  5209. Rewind  
  5210. Pause t 
  5211. Play rt 
  5212. FF n rt 
  5213. Unload  
  5214. Play From....
  5215. Play To...  
  5216. Play FromToo.
  5217. Length
  5218. 167563/
  5219. Position
  5220. 08086
  5221. Position:         
  5222. Length: onds: e:  
  5223. txclassname
  5224. 3DFrame Recessed
  5225. D:\MMDATA\allegro.mid
  5226. MIDI File: s: e:  
  5227. Tempo
  5228. Tempo:  Position: 
  5229. 4s_tempoMax
  5230. ZfileName
  5231. a MIDI 
  5232. OpenDlg(".", "*.
  5233. g", "Please choose a 
  5234. D.", "Choose 
  5235. @File")
  5236.     --close old 
  5237. B"Unload"
  5238. tbkMCIchk("
  5239. " && 
  5240.  && "alias MIDIFile","",1,1)
  5241. ms","",1)
  5242. "length" 
  5243. Sstatus 
  5244. ,"",1)
  5245. %midiFile division type","",1,1)
  5246. c"25"
  5247. c"24"
  5248. c"30"
  5249. c"30 drop"
  5250. c"PPQN"
  5251. "Max Tempo"
  5252. sliderPosition 
  5253. "tempoSlider" 
  5254. midifile 
  5255. ","",1)/
  5256. buttonDown
  5257. buttonDown
  5258. *.mid
  5259. Please choose a MIDI file.
  5260. Choose MIDI File
  5261. OpenDlg
  5262. buttonDown
  5263. Unload
  5264. alias MIDIFile
  5265. tbkMCIchk
  5266. set MIDIFile time format ms
  5267. tbkMCIchk
  5268. length
  5269. status MIDIFile length
  5270. tbkMCIchk
  5271. status midiFile division type
  5272. tbkMCIchk
  5273. 30 drop
  5274. Max Tempo
  5275. tempoSlider
  5276. sliderPosition
  5277. status midifile tempo
  5278. tbkMCIchk
  5279. fileName
  5280. s_tempoMax
  5281. Restart
  5282. tbkMCIchk("seek MIDIFile 
  5283. 0","",1)
  5284. buttonDown
  5285. buttonDown
  5286. seek MIDIFile to 0
  5287. tbkMCIchk
  5288. Rewind
  5289. 4MIDIctr
  5290. FALSE
  5291. tbkMCI("stop MIDIfile","")
  5292. tbkMCIchk("status MIDIFile 
  5293. ","",1)
  5294. s <> 
  5295.  < 100
  5296. " && 
  5297. ,"",1)
  5298. uttonDown
  5299. buttonStillDown
  5300. buttonDown
  5301. buttonUp
  5302. buttonDown
  5303. stop MIDIfile
  5304. tbkMCI
  5305. status MIDIFile position
  5306. tbkMCIchk
  5307. MIDIctr
  5308. buttonStillDown
  5309. position
  5310. MIDIctr
  5311. buttonUp
  5312. seek MIDIFile to
  5313. tbkMCIchk
  5314. MIDIctr
  5315. Pause
  5316. tbkMCIchk("
  5317. MIDIFile","",1)
  5318. buttonDown
  5319. buttonDown
  5320. pause MIDIFile
  5321. tbkMCIchk
  5322. tbkMCIchk("play MIDIFile","",1)
  5323. yieldApp()
  5324. buttonDown
  5325. buttonDown
  5326. play MIDIFile
  5327. tbkMCIchk
  5328. yieldApp
  5329. 4MIDIctr, MIDImax
  5330. FALSE
  5331. tbkMCI("stop MIDIfile","")
  5332. tbkMCIchk("status MIDIFile 
  5333. ","",1)
  5334. " && "length","",1)
  5335.  - 100
  5336. " && 
  5337. "",1)
  5338. uttonDown
  5339. buttonStillDown
  5340. buttonDown
  5341. buttonUp
  5342. buttonDown
  5343. stop MIDIfile
  5344. tbkMCI
  5345. status MIDIFile position
  5346. tbkMCIchk
  5347. status MIDIFile
  5348. length
  5349. tbkMCIchk
  5350. MIDIctr
  5351. MIDImax
  5352. buttonStillDown
  5353. position
  5354. MIDIctr
  5355. MIDImax
  5356. buttonUp
  5357. seek MIDIFile to
  5358. tbkMCIchk
  5359. MIDIctr
  5360. MIDImax
  5361. Unload
  5362. tbkMCI("close MIDIFile","")
  5363. buttonDown
  5364. buttonDown
  5365. close MIDIFile
  5366. tbkMCI
  5367. Play From
  5368. ("Play 
  5369. tbkMCIchk("play MIDIFile 
  5370. " && 
  5371. ,"",1)
  5372. yieldApp()
  5373. buttonDown
  5374. buttonDown
  5375. Play from
  5376. play MIDIFile from
  5377. tbkMCIchk
  5378. yieldApp
  5379. Play To
  5380. "Length"
  5381. ("Play 
  5382. tbkMCIchk("play MIDIFile 
  5383. " && 
  5384. ,"",1)
  5385. yieldApp()
  5386. buttonDown
  5387. buttonDown
  5388. Length
  5389. Play to
  5390. play MIDIFile from 0 to
  5391. tbkMCIchk
  5392. yieldApp
  5393. Play From To
  5394. "Length"
  5395. ("Play 
  5396. f"0," & 
  5397. tbkMCIchk("play MIDIFile 
  5398. " && 
  5399.             && 
  5400. ,"",1)
  5401. yieldApp()
  5402. buttonDown
  5403. buttonDown
  5404. Length
  5405. Play from, to
  5406. play MIDIFile from
  5407. tbkMCIchk
  5408. yieldApp
  5409. J8!    ;
  5410. Slider
  5411. 7txClassName
  5412. Slider
  5413. thumb
  5414. --thumb 
  5415. seek midi file 
  5416. slider's 
  5417. tbkMCIchk("status MIDIfile length","",1,1)
  5418. sliderPosition 
  5419. " && 
  5420. ,"",1)
  5421. buttonUp
  5422. buttonUp
  5423. status MIDIfile length
  5424. tbkMCIchk
  5425. sliderPosition
  5426. seek MIDIfile to
  5427. tbkMCIchk
  5428. ;txClassName
  5429. HSliderThumb
  5430. ;defFillColor
  5431. 0,100,0
  5432. ;glide
  5433. line id 105 of page id 9
  5434. <width
  5435. 0<defStrokeColor
  5436. 0,0,0
  5437. Max Tempo
  5438.  Max Tempo: tion: 
  5439. Stop rt 
  5440. tbkMCIchk("Stop midiFile","",1,1)
  5441. "seek 
  5442. 0","",1)
  5443. buttonDown
  5444. buttonDown
  5445. Stop midiFile
  5446. tbkMCIchk
  5447. seek midiFile to 0
  5448. tbkMCIchk
  5449. cd Audio:  Large Simple Controls
  5450. Wave Audio:  Simple Controls
  5451. MIDI sequencer:  Event Editor
  5452. Videodisc:  Event Editor
  5453.  b"`#
  5454. %(+:0B1B2
  5455. noCopy
  5456. The controls on this page let you select a clip from a videodisc and create a button that plays that clip.  
  5457. After turning the videodisc driver on, select a clip from the disc by playing the disc, and then clicking the buttons next to the Start and End Position fields.  This will set the Start and End Position Field text to current position of the videodisc.  You can also edit the text in the Start and End Position fields.  The End Position field text should be greater than the Start Position field text.  Click the Play Clip button to test your clip.  When you're done, click the Make A Videodisc Clip Button button.  A button that plays your clip will be copied to the clipboard.
  5458. The position slider and the Track, Frame and Total Frames fields are updated by an  idle  
  5459. handler in the script of this page.  You could also use timer services provided by the tbkTimer functions to update those at a rate over which you will have much more control.]
  5460.  s_device :  a system variable used in the idle handler to bypass status queries.
  5461.  s_idle :  a system variable use to count idle messages.
  5462.  s_MediaType : a system variable inidicating that the videodisc is CAV or CLV format.
  5463.  s_pos : a system variable containing the current position of the disc in milliseconds while scanning forward.
  5464.  s_vLength : a system variable containing the length of the disc in milliseconds while scanning forward.ward.
  5465.  s_vLength : a system variable containing the length of the disc in milliseconds while scanning forward.
  5466. editScript "
  5467. s_device", 
  5468. "driver switch"
  5469. buttonDown
  5470. buttonDown
  5471. editScript
  5472. set s_device
  5473. driver switch
  5474. editScript "
  5475. us_idle", 
  5476. buttonDown
  5477. buttonDown
  5478. editScript
  5479. decrement s_idle
  5480. editScript "
  5481. s_mediaType 
  5482. tbkMCIchk(""status videodisc 
  5483. % type", 
  5484. B"Reverse Scan"
  5485. buttonDown
  5486. buttonDown
  5487. editScript
  5488. set s_mediaType to tbkMCIchk("status videodisc media type
  5489. Reverse Scan
  5490. editScript "
  5491. s_pos 
  5492. tbkMCI(""status videodisc 
  5493. B"Forward Scan"
  5494. buttonDown
  5495. buttonDown
  5496. editScript
  5497. set s_pos to tbkMCI("status videodisc position
  5498. Forward Scan
  5499. editScript "
  5500. s_vLength 
  5501. tbkMCI(""status videodisc length", 
  5502. B"Forward Scan"
  5503. buttonDown
  5504. buttonDown
  5505. editScript
  5506. set s_vLength to tbkMCI("status videodisc length
  5507. Forward Scan
  5508. Videodisc
  5509. Event Editor
  5510. Start Position
  5511. Start Position:  n  
  5512. End Position
  5513. End Position: tion  
  5514. Play Clip
  5515. Restart Clipck 
  5516. "Start Position" 
  5517. "Please 
  5518. a clip 
  5519. tbkMCIchk("seek videodisc 
  5520. " && 
  5521. \,"",1)
  5522. buttonDown
  5523. buttonDown
  5524. Start Position
  5525. Please select a clip first.
  5526. seek videodisc to
  5527. Start Position
  5528. tbkMCIchk
  5529. "Start Position" 
  5530. "Please 
  5531. a clip 
  5532. tbkMCIchk("play videodisc 
  5533. " && 
  5534. ]&& \
  5535. " && 
  5536. "End 
  5537. p,"",1)
  5538. yieldApp()
  5539. buttonDown
  5540. buttonDown
  5541. Start Position
  5542. Please select a clip first.
  5543. play videodisc from
  5544. Start Position
  5545. End Position
  5546. tbkMCIchk
  5547. yieldApp
  5548. Start Clip
  5549. tbkMCIchk("status videodisc 
  5550. ","",1,1)
  5551. "Start Position"
  5552. buttonDown
  5553. buttonDown
  5554. status videodisc position
  5555. tbkMCIchk
  5556. Start Position
  5557. Start Clip
  5558. End Clip
  5559. tbkMCIchk("status videodisc 
  5560. ","",1,1)
  5561. "End Position"
  5562. buttonDown
  5563. buttonDown
  5564. status videodisc position
  5565. tbkMCIchk
  5566. End Position
  5567. End Clip
  5568. Make A Videodisc Clip Button
  5569. Driver On/Off
  5570. Driver switch
  5571. 4s_device
  5572. Zswitch, x
  5573. -(y1, 
  5574. "off"
  5575. tbkMCI("stop videodisc wait","")
  5576. --use 
  5577. asure 
  5578. worked
  5579. <close 
  5580. 7","")
  5581. 0,50.1875,0
  5582. tbkMCIchk("
  5583. shareable","",1,1)
  5584. buttonUp
  5585. buttonUp
  5586. false
  5587. stop videodisc wait
  5588. tbkMCI
  5589. close videodisc
  5590. tbkMCI
  5591. open videodisc shareable
  5592. tbkMCIchk
  5593. videodisc
  5594. 120,50,100
  5595. switch
  5596. s_device
  5597. txclassname
  5598. vSwitchHandle
  5599. Scan rt 
  5600. Play     
  5601. Step rt 
  5602. Pause t 
  5603. Step rt 
  5604. Play rt 
  5605. Scan rt 
  5606. checkDevice TRUE
  5607. tbkMCIchk("play videodisc reverse","",1,1)
  5608. buttonUp
  5609. buttonUp
  5610. checkDevice
  5611. play videodisc reverse
  5612. tbkMCIchk
  5613. checkDevice TRUE
  5614. tbkMCIchk("
  5615. videodisc reverse","",1,1)
  5616. buttonDown
  5617. buttonStillDown
  5618. buttonDown
  5619. checkDevice
  5620. buttonStillDown
  5621. step videodisc reverse
  5622. tbkMCIchk
  5623. checkDevice TRUE
  5624. tbkMCIchk("
  5625. videodisc","",1,1)
  5626. buttonUp
  5627. buttonUp
  5628. checkDevice
  5629. pause videodisc
  5630. tbkMCIchk
  5631. &2L/:
  5632. checkDevice TRUE
  5633. tbkMCIchk("
  5634. videodisc","",1,1)
  5635. buttonDown
  5636. buttonStillDown
  5637. buttonDown
  5638. checkDevice
  5639. buttonStillDown
  5640. step videodisc
  5641. tbkMCIchk
  5642. checkDevice TRUE
  5643. tbkMCI("play videodisc","")
  5644. buttonUp
  5645. buttonUp
  5646. checkDevice
  5647. play videodisc
  5648. tbkMCI
  5649. Forward Scan
  5650. 4s_MediaType
  5651. checkDevice TRUE
  5652. s_mediaType 
  5653. tbkMCIchk("status videodisc 
  5654. $ type","",1,1)
  5655. "CAV"
  5656. :("play 
  5657. 1scan","")
  5658. 4s_pos,s_vLength
  5659. ms","")
  5660. ","")
  5661. length","")
  5662. H1000
  5663. HMSFromMillisec(
  5664. ","")
  5665. " && 
  5666. "",1)
  5667. ","")
  5668. uttonDown
  5669. buttonStillDown
  5670. buttonDown
  5671. buttonUp
  5672. buttonDown
  5673. checkDevice
  5674. s_mediaType
  5675. status videodisc media type
  5676. tbkMCIchk
  5677. play videodisc scan
  5678. tbkMCI
  5679. set videodisc time format ms
  5680. tbkMCI
  5681. status videodisc position
  5682. tbkMCI
  5683. status videodisc length
  5684. tbkMCI
  5685. s_pos
  5686. s_vLength
  5687. s_MediaType
  5688. buttonStillDown
  5689. position
  5690. HMSFromMillisec
  5691. s_pos
  5692. s_vLength
  5693. s_MediaType
  5694. buttonUp
  5695. play videodisc
  5696. tbkMCI
  5697. play videodisc from
  5698. tbkMCIchk
  5699. set videodisc time format HMS
  5700. tbkMCI
  5701. s_pos
  5702. s_vLength
  5703. s_MediaType
  5704. Reverse Scan
  5705. 4s_MediaType
  5706. checkDevice TRUE
  5707. s_mediaType 
  5708. tbkMCIchk("status videodisc 
  5709. $ type","",1,1)
  5710. "CAV"
  5711. :("play 
  5712. 1reverse scan","")
  5713. 4s_pos
  5714. ms","")
  5715. ","")
  5716. ` > 0
  5717. H1000
  5718. HMSFromMillisec(
  5719. ","")
  5720. " && 
  5721. ,"",1)
  5722. ","")
  5723. uttonDown
  5724. buttonStillDown
  5725. buttonDown
  5726. buttonUp
  5727. buttonDown
  5728. checkDevice
  5729. s_mediaType
  5730. status videodisc media type
  5731. tbkMCIchk
  5732. play videodisc reverse scan
  5733. tbkMCI
  5734. set videodisc time format ms
  5735. tbkMCI
  5736. status videodisc position
  5737. tbkMCI
  5738. s_pos
  5739. s_MediaType
  5740. buttonStillDown
  5741. position
  5742. HMSFromMillisec
  5743. s_pos
  5744. s_MediaType
  5745. buttonUp
  5746. play videodisc reverse
  5747. tbkMCI
  5748. play videodisc from
  5749. tbkMCIchk
  5750. set videodisc time format HMS
  5751. tbkMCI
  5752. s_pos
  5753. s_MediaType
  5754. checkDevice TRUE
  5755. tbkMCIchk("seek videodisc 
  5756. 0","",1,1)
  5757. buttonUp
  5758. buttonUp
  5759. checkDevice
  5760. seek videodisc to 0
  5761. tbkMCIchk
  5762. checkDevice TRUE
  5763. tbkMCIchk("stop videodisc","",1,1)
  5764. buttonUp
  5765. buttonUp
  5766. checkDevice
  5767. stop videodisc
  5768. tbkMCIchk
  5769. Restart 
  5770. Stop rt 
  5771. checkDevice TRUE
  5772. tbkMCI("status videodisc mode","") 
  5773. tbkMCIchk("
  5774. 'door closed","",1)
  5775. ","",1)
  5776. buttonUp
  5777. buttonUp
  5778. checkDevice
  5779. status videodisc mode
  5780. tbkMCI
  5781. set videodisc door closed
  5782. tbkMCIchk
  5783. set videodisc door open
  5784. tbkMCIchk
  5785. Eject t 
  5786. Position:
  5787. Track: : rack: 
  5788. n6txclassname
  5789. 3DFrame Recessed
  5790. Length:
  5791. Track
  5792. Position
  5793. Length
  5794. MIDI sequencer: Controls
  5795. Bitmap Graphics:  A Bitmap Index
  5796. CD Audio:  Event Editor
  5797. More Buttons
  5798. Animation:  Event Editor
  5799. B"Unload"
  5800. tbkMCI("status aniFile 
  5801. ","")
  5802. "Name" 
  5803. "Length"
  5804. "Position"
  5805. "Start 
  5806. "End 
  5807. leavepage
  5808. leavepage
  5809. buttonDown
  5810. Unload
  5811. status aniFile position
  5812. tbkMCI
  5813. Length
  5814. Position
  5815. Start Position
  5816. End Position
  5817. Position
  5818. Position
  5819. noCopy
  5820. The controls on this page let you select a clip from an animation file and create a button that plays that clip.  
  5821. After loading an animation file, select a clip from it by clicking the Start and End Clip buttons while the animation file is playing.  This will set the Start and End Position Field text to the animation file's current position.  You can also edit the text of the Start and End Position fields.  The End Position field text should be greater than the Start Position field text.  Click the Play Clip button to test your clip.  When you're done, click the Make An Animation Clip Button button.  A button that plays the clip will be copied to the clipboard.
  5822. The animation file is  opened  in the Load button script.  This sets the file length system variable.  The system variable is cleared, and the window, if open, is  closed  by the Unload button script when you click it , or if you leave this page.e.ou leave this page.
  5823. editScript "
  5824. tbkmcichk(""
  5825. B"load"
  5826. buttonUp
  5827. buttonUp
  5828. editScript
  5829. get tbkmcichk("open
  5830. editScript "
  5831. tbkmci(""close", 
  5832. B"unload"
  5833. buttonUp
  5834. buttonUp
  5835. editScript
  5836. get tbkmci("close
  5837. unload
  5838.  aniFile : an alias for the current animation file.
  5839.  s_aniHandle : a system variable containg the handle to the animation window.
  5840. editScript "alias aniFile", 
  5841. B"load"
  5842. buttonUp
  5843. buttonUp
  5844. editScript
  5845. alias aniFile
  5846. Animation
  5847. Event Editor
  5848. Start Position
  5849. Start Position:  n  
  5850. End Position
  5851. End Position: tion  
  5852. Play Clip
  5853. Restart Clipck 
  5854. Make An Animation Clip Button
  5855. Make An Animation Clip Button
  5856. Restart
  5857. Track 
  5858. Rewind  
  5859. Pause t 
  5860. Play rt 
  5861. FF n rt 
  5862. Unload  
  5863. Length
  5864. Position
  5865. Position: sition: 
  5866. Frames: onds: e:  
  5867. txclassname
  5868. 3DFrame Recessed
  5869. Animation File:   
  5870. ZfileName
  5871. a animation 
  5872. OpenDlg(".", "*.fl?", "Please choose 
  5873. J.", "Choose Animation File")
  5874.     --close old 
  5875. B"Unload"
  5876. tbkMCIchk("
  5877. " && 
  5878.  && "alias aniFile 
  5879. " && 
  5880. 8,"",1,1)
  5881. frames","",1)
  5882. "length" 
  5883. ostatus 
  5884. ,"",1)
  5885. seek 
  5886. 1","",1)
  5887. state 
  5888. ","",1)
  5889. buttonDown
  5890. buttonDown
  5891. *.fl?
  5892. Please choose an animation file.
  5893. Choose Animation File
  5894. OpenDlg
  5895. buttonDown
  5896. Unload
  5897. alias aniFile parent
  5898. tbkMCIchk
  5899. set aniFile time format frames
  5900. tbkMCIchk
  5901. length
  5902. status aniFile length
  5903. tbkMCIchk
  5904. seek aniFile to 1
  5905. tbkMCIchk
  5906. window aniFile state show
  5907. tbkMCIchk
  5908. fileName
  5909. fileName
  5910. c:\tbkmm2\mmrk.mmm
  5911. Unload
  5912. 4s_aniHandle
  5913.     --close animation file
  5914. tbkMCI("status aniFile ready","") 
  5915. P <> 
  5916.             untranslateAllWindowMessages 
  5917. X","")
  5918. buttondown
  5919. buttondown
  5920. status aniFile ready
  5921. tbkMCI
  5922. close aniFile
  5923. tbkMCI
  5924. s_aniHandle
  5925. Restart
  5926. tbkMCI("seek aniFile 
  5927. 1","")
  5928. buttondown
  5929. buttondown
  5930. seek aniFile to 1
  5931. tbkMCI
  5932. Rewind
  5933. tbkMCIchk("status aniFile 
  5934. ","",1)
  5935. $("seek 
  5936. " && 
  5937. b(0, 
  5938. - 10),"")
  5939. buttonStillDown
  5940. buttonStillDown
  5941. status aniFile position
  5942. tbkMCIchk
  5943. seek aniFile to
  5944. tbkMCI
  5945. Step Reverse
  5946. tbkMCIchk("
  5947. aniFile","",1,1)
  5948.  reverse 
  5949. H1","",1)
  5950. buttonDown
  5951. buttonDown
  5952. pause aniFile
  5953. tbkMCIchk
  5954. step aniFile reverse by 1
  5955. tbkMCIchk
  5956. Pause
  5957. tbkMCIchk("
  5958. aniFile","")
  5959. buttondown
  5960. buttondown
  5961. pause aniFile
  5962. tbkMCIchk
  5963. Step Forward
  5964. tbkMCIchk("
  5965. aniFile","",1,1)
  5966. H1","",1)
  5967. buttonDown
  5968. buttonDown
  5969. pause aniFile
  5970. tbkMCIchk
  5971. step aniFile by 1
  5972. tbkMCIchk
  5973. tbkMCIchk("play aniFile","",1)
  5974. yieldApp()
  5975. buttonDown
  5976. buttonDown
  5977. play aniFile
  5978. tbkMCIchk
  5979. yieldApp
  5980. tbkMCIchk("status aniFile 
  5981. ","",1)
  5982. $("seek 
  5983. " && 
  5984. "length", 
  5985. + 10),"")
  5986. buttonStillDown
  5987. buttonStillDown
  5988. status aniFile position
  5989. tbkMCIchk
  5990. seek aniFile to
  5991. length
  5992. tbkMCI
  5993. Restart Clip
  5994. "Start Position" 
  5995. "Please 
  5996. a clip 
  5997. tbkMCIchk("seek aniFile 
  5998. " && 
  5999. Z,"",1)
  6000. buttonDown
  6001. buttonDown
  6002. Start Position
  6003. Please select a clip first.
  6004. seek aniFile to
  6005. Start Position
  6006. tbkMCIchk
  6007. Play Clip
  6008. "Start Position" 
  6009. "Please 
  6010. a clip 
  6011. tbkMCIchk("play aniFile 
  6012. " && 
  6013. [&& \
  6014. " && 
  6015. "End 
  6016. n,"",1)
  6017. yieldApp()
  6018. buttonDown
  6019. buttonDown
  6020. Start Position
  6021. Please select a clip first.
  6022. play aniFile from
  6023. Start Position
  6024. End Position
  6025. tbkMCIchk
  6026. yieldApp
  6027. Start Clip
  6028. tbkMCIchk("status aniFile 
  6029. ","",1,1)
  6030. "Start Position"
  6031. buttonDown
  6032. buttonDown
  6033. status aniFile position
  6034. tbkMCIchk
  6035. Start Position
  6036. Start Clip
  6037. End Clip
  6038. tbkMCIchk("status aniFile 
  6039. ","",1,1)
  6040. "End Position"
  6041. buttonDown
  6042. buttonDown
  6043. status aniFile position
  6044. tbkMCIchk
  6045. End Position
  6046. End Clip
  6047. Videodisc:  Control Panels
  6048. Timers:  Status
  6049. Timers: Status
  6050. MIDI Sequencer:  Buttons
  6051.  Button
  6052. tbkMCI("close MIDIfile","")
  6053. leavePage
  6054. leavePage
  6055. close MIDIfile
  6056. tbkMCI
  6057. The Play and Wait, and Play and Notify buttons open, play and close a MIDI file determined by their fileName user property.  To play a wave file in your own application, copy either of these buttons to your book and  right click  them in Reader mode.  You'll be prompted to enter the name of a MIDI file.  That name will be stored in the button's fileName user property and played when you click it.
  6058. The Play and Wait button's buttonDown handler opens,  plays  and closes  its MIDI file with the  wait  parameter.  This delays subsequent openScript statements from executing until the MIDI  file finishes playing and closes.
  6059. The Play and Notify button specifies itself as the notification object.  Its buttonDown handler opens and plays its MIDI file without using the wait parameter.  Its tbkmmNotify handler
  6060.  closes  the MIDI file....
  6061. editScript "
  6062. B"Play 
  6063. Wait"
  6064. buttonDown
  6065. buttonDown
  6066. editScript
  6067. to handle rightButtonUp
  6068. Play and Wait
  6069. editScript "
  6070. tbkMCIchk(""play", 
  6071. B"Play And Wait"
  6072. buttonDown
  6073. buttonDown
  6074. editScript
  6075. get tbkMCIchk("play
  6076. Play And Wait
  6077. editScript "
  6078. tbkMCIchk(""close", 
  6079. B"Play And Wait"
  6080. buttonDown
  6081. buttonDown
  6082. editScript
  6083. get tbkMCIchk("close
  6084. Play And Wait
  6085. editScript "wait", 
  6086. B"Play And Wait"
  6087. buttonDown
  6088. buttonDown
  6089. editScript
  6090. Play And Wait
  6091. editScript "
  6092. tbkmmnotify", 
  6093. B"Play And Notify"
  6094. buttonDown
  6095. buttonDown
  6096. editScript
  6097. to handle tbkmmnotify
  6098. Play And Notify
  6099.  MIDIfile : an alias used for the Play and Wait, and Play and Notify buttons' MIDI files..
  6100. editScript "alias midiFile", 
  6101. B"Play And Wait"
  6102. buttonUp
  6103. buttonUp
  6104. editScript
  6105. alias midiFile
  6106. Play And Wait
  6107. MIDI Sequencer
  6108. Generic MIDI Buttonssonss
  6109. Play and Wait
  6110. ofileName
  6111. tbkMCI("status midifile mode","") 
  6112. c"play"
  6113. ,close midiFile","")
  6114. tbkMCIchk("
  6115. " && 
  6116. { && "alias 
  6117. 5,1,1)
  6118. E wait","",1)
  6119. --prompt 
  6120. OpenDlg(".", "*.
  6121. g", "Choose a MIDI 
  6122. B.", "
  6123. buttonDown
  6124. rightButtonUp
  6125. buttonDown
  6126. fileName
  6127. prightButtonUp
  6128. status midifile mode
  6129. tbkMCI
  6130. close midiFile
  6131. tbkMCI
  6132. fileName
  6133. alias midiFile
  6134. tbkMCIchk
  6135. play midiFile wait
  6136. tbkMCIchk
  6137. close midiFile
  6138. tbkMCIchk
  6139. rightButtonUp
  6140. *.mid
  6141. Choose a MIDI file for this button.
  6142. Choose MIDI File
  6143. OpenDlg
  6144. fileName
  6145. fileName
  6146. Play and Wait
  6147. Play and Notify
  6148. ofileName
  6149. tbkMCI("close midiFile","")
  6150. tbkMCIchk("
  6151. " && 
  6152. M && "alias 
  6153. /,1,1)
  6154. )play 
  6155. tbkmmNotify
  6156. lstatus 
  6157. g mode","")
  6158. c"stop" 
  6159. OpenDlg(".", "*.
  6160. g", "Choose a MIDI 
  6161. B.", "
  6162. tonUp
  6163. tbkmmNotify
  6164. buttonUp
  6165. rightButtonUp
  6166. buttonUp
  6167. fileName
  6168. prightButtonUp
  6169. close midiFile
  6170. tbkMCI
  6171. fileName
  6172. alias midiFile
  6173. tbkMCIchk
  6174. play midiFile
  6175. tbkMCIchk
  6176. tbkmmNotify
  6177. status midiFile mode
  6178. tbkMCI
  6179. pause
  6180. close midiFile
  6181. tbkMCI
  6182. rightButtonUp
  6183. *.mid
  6184. Choose a MIDI file for this button.
  6185. Choose MIDI File
  6186. OpenDlg
  6187. fileName
  6188. fileName
  6189. Play and Notify
  6190. ZstartPos, endPos
  6191. "Start Position" 
  6192. "Please 
  6193. a clip 
  6194. "End 
  6195. setDefaultButtonStyle
  6196. 2000,750
  6197. "CD Audio Clip"
  6198. }" & CRLF & TAB & \
  6199. ZoldTimeFormat" & 
  6200. tbkMCI(""
  6201. cdAudio shareable"",
  6202. )" & 
  6203. " && \
  6204. 9status 
  6205. )" & 
  6206. msf"",
  6207. )" & 
  6208. zplay 
  6209. " && 
  6210.  && \
  6211. " && 
  6212.  && "wait"",
  6213. )" & 
  6214. "" && 
  6215. )" & 
  6216. close 
  6217. )" & 
  6218. Bthat plays a CD 
  6219. " && 
  6220.  && \
  6221. " && 
  6222.  && "has been copied 
  6223. the clipboard."
  6224. buttonDown
  6225. buttonDown
  6226. Start Position
  6227. Please select a clip first.
  6228. Start Position
  6229. End Position
  6230. setDefaultButtonStyle
  6231. CD Audio Clip
  6232. to handle buttonUp
  6233. local oldTimeFormat
  6234. get tbkMCI("open cdAudio shareable","")
  6235. set oldTimeFormat to
  6236. tbkMCI("status cdAudio time format","")
  6237. get tbkMCI("set cdAudio time format msf","")
  6238. get tbkMCI("play cdAudio from
  6239. wait","")
  6240. get tbkMCI("set cdAudio time format to" && oldTimeFormat,"")
  6241. get tbkMCI("close cdAudio","")
  6242. A button that plays a CD from
  6243. has been copied to the clipboard.
  6244. startPos
  6245. endPos
  6246. bitmap 
  6247. generic 
  6248. index widget
  6249. 4s_fileName, s_x, s_y, s_ext, s_last
  6250.         --cache these user 
  6251. faster referencing
  6252. oextension
  6253. cached 
  6254. tbkBitmapchk("
  6255. " && 
  6256.  & "1." & 
  6257.  && "alias ix1 style child", 1, 1)
  6258. " && s_x & "," & s_y)
  6259. Cate 
  6260. textScrolled
  6261. s_filename 
  6262. " && 
  6263. I & \
  6264.             "." & 
  6265.  && "
  6266. h && "
  6267. eix" & 
  6268.  && "
  6269. " && 
  6270. eix" & 
  6271.  && "state 
  6272. e" && 
  6273.  && "
  6274. ("close" && 
  6275. "ix" & num
  6276. e" && 
  6277.  && "
  6278. files that 
  6279. indexer controls
  6280. rightbuttonUp
  6281. 4centerPoint, indexing, currIx
  6282. x, y, frames
  6283.     --choose 
  6284. highest numbered 
  6285. openDlg(".", "", "Choose 
  6286. a series.", "Set Index Bitmaps")
  6287. - 2) 
  6288. - 3) 
  6289. cTRUE
  6290. "Your 
  6291. pdoesn't 
  6292. ("Where 
  6293. zyou want 
  6294. bitmaps 
  6295. appear? (x,y)" 
  6296. ox & "," & 
  6297. CRLF 
  6298. textScrolled
  6299. mouseEnter
  6300. mouseLeave
  6301. rightbuttonUp
  6302. mouseEnter
  6303. fileName
  6304. extension
  6305. alias ix1 style child
  6306. tbkBitmapchk
  6307. window ix1 position
  6308. tbkBitmap
  6309. window ix1 state show
  6310. tbkBitmap
  6311. s_fileName
  6312. s_ext
  6313. s_last
  6314. textScrolled
  6315. s_filename
  6316. alias ix
  6317. style child
  6318. tbkBitmapchk
  6319. window ix
  6320. position
  6321. tbkBitmap
  6322. window ix
  6323. state show
  6324. tbkBitmap
  6325. window
  6326. state hide
  6327. tbkBitmap
  6328. close
  6329. tbkBitmap
  6330. s_fileName
  6331. s_ext
  6332. s_last
  6333. mouseLeave
  6334. window
  6335. state hide
  6336. tbkBitmap
  6337. close
  6338. tbkBitmap
  6339. s_ext
  6340. s_filename
  6341. s_last
  6342. rightbuttonUp
  6343. mouseLeave
  6344. Choose the highest numbered bitmap in a series.
  6345. Set Index Bitmaps
  6346. openDlg
  6347. fileName
  6348. extension
  6349. extension
  6350. Your file name doesn't end in a number.
  6351. Where do you want the bitmaps to appear? (x,y)
  6352. cancel
  6353. fileName
  6354. fileName
  6355. frames
  6356. fileName
  6357. frames
  6358. centerPoint
  6359. indexing
  6360. currIx
  6361. MIDI sequencer:  Event Editor
  6362. B"Unload"
  6363. --update the 
  6364. tbkMCI("status MIDIFile 
  6365. ","")
  6366. "Length"
  6367. "Position"
  6368. "Name"
  6369. "Start 
  6370. "End 
  6371. leavepage
  6372. leavepage
  6373. buttonDown
  6374. Unload
  6375. status MIDIFile position
  6376. tbkMCI
  6377. Length
  6378. Position
  6379. Start Position
  6380. End Position
  6381. Position
  6382. Position
  6383. noCopy
  6384. The controls on this page let you select a clip from a MIDI file and create a button that plays that clip.  
  6385. After loading a MIDI file, select a clip from it by clicking the Start and End Clip buttons while the MIDI file is playing.  This will set the Start and End Position Field text to MIDI file's current position.  You can also edit the text of the Start and End Position fields.  The End Position field text should be greater than the Start Position field text.  Click the Play Clip button to test your clip.    When you're done, click the Make A MIDI Clip Button button.  A button that plays the clip will be copied to the clipboard.
  6386. The Position field requires this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want it to update correctly.   y.   update correctly.  ates the Current Position field by querying the status of the wave audio driver.  Some of these controls and the idle handler require the Wave File, Milliseconds and Current Position fields.    If you copy these fields, you need to use this page's idle handler.
  6387.  MIDIfile : an alias used for the current MIDI file.
  6388. editScript "alias midiFile", 
  6389. B"Load"
  6390. buttonUp
  6391. buttonUp
  6392. editScript
  6393. alias midiFile
  6394. MIDI Sequencer
  6395. Event Editor
  6396. Start Position
  6397. Start Position:  n  
  6398. End Position
  6399. End Position: tion  
  6400. Play Clip
  6401. Restart Clipck 
  6402. Restart
  6403.  rack 
  6404. Rewind  
  6405. Pause t 
  6406. Play rt 
  6407. FF n rt 
  6408. Unload  
  6409. Length
  6410. Position
  6411. Position:  ition: 
  6412. Length: onds: e:  
  6413. txclassname
  6414. 3DFrame Recessed
  6415. MIDI File: s: e:  
  6416. Stop rt 
  6417. ZfileName
  6418. a MIDI 
  6419. OpenDlg(".", "*.
  6420. g", "Please choose a 
  6421. D.", "Choose 
  6422. @File")
  6423.     --close old 
  6424. B"unload"
  6425. tbkMCIchk("
  6426. " && 
  6427.  && "alias MIDIFile","",1,1)
  6428. ms","",1)
  6429. Tstatus 
  6430. > length","",1)
  6431. buttonDown
  6432. buttonDown
  6433. *.mid
  6434. Please choose a MIDI file.
  6435. Choose MIDI File
  6436. OpenDlg
  6437. buttonDown
  6438. unload
  6439. alias MIDIFile
  6440. tbkMCIchk
  6441. set MIDIFile time format ms
  6442. tbkMCIchk
  6443. status MIDIFile length
  6444. tbkMCIchk
  6445. length
  6446. fileName
  6447. Unload
  6448. tbkMCI("close MIDIFile","")
  6449. buttonDown
  6450. buttonDown
  6451. close MIDIFile
  6452. tbkMCI
  6453. Restart
  6454. tbkMCIchk("seek MIDIFile 
  6455. 0","",1)
  6456. buttonDown
  6457. buttonDown
  6458. seek MIDIFile to 0
  6459. tbkMCIchk
  6460. Rewind
  6461. 4MIDIctr
  6462. FALSE
  6463. tbkMCI("stop MIDIfile","")
  6464. tbkMCIchk("status MIDIFile 
  6465. ","",1)
  6466. s <> 
  6467.  < 100
  6468. " && 
  6469. ,"",1)
  6470. uttonDown
  6471. buttonStillDown
  6472. buttonDown
  6473. buttonUp
  6474. buttonDown
  6475. stop MIDIfile
  6476. tbkMCI
  6477. status MIDIFile position
  6478. tbkMCIchk
  6479. MIDIctr
  6480. buttonStillDown
  6481. position
  6482. MIDIctr
  6483. buttonUp
  6484. seek MIDIFile to
  6485. tbkMCIchk
  6486. MIDIctr
  6487. B    o    ^
  6488. Pause
  6489. tbkMCIchk("
  6490. MIDIFile","",1)
  6491. buttonDown
  6492. buttonDown
  6493. pause MIDIFile
  6494. tbkMCIchk
  6495. tbkMCIchk("Stop midiFile","",1,1)
  6496. "seek 
  6497. 0","",1)
  6498. buttonDown
  6499. buttonDown
  6500. Stop midiFile
  6501. tbkMCIchk
  6502. seek midiFile to 0
  6503. tbkMCIchk
  6504. tbkMCIchk("play MIDIFile","",1)
  6505. yieldApp()
  6506. buttonDown
  6507. buttonDown
  6508. play MIDIFile
  6509. tbkMCIchk
  6510. yieldApp
  6511. 4MIDIctr, MIDImax
  6512. FALSE
  6513. tbkMCI("stop MIDIfile","")
  6514. tbkMCIchk("status MIDIFile 
  6515. ","",1)
  6516. " && "length","",1)
  6517.  - 100
  6518. " && 
  6519. "",1)
  6520. uttonDown
  6521. buttonStillDown
  6522. buttonDown
  6523. buttonUp
  6524. buttonDown
  6525. stop MIDIfile
  6526. tbkMCI
  6527. status MIDIFile position
  6528. tbkMCIchk
  6529. status MIDIFile
  6530. length
  6531. tbkMCIchk
  6532. MIDIctr
  6533. MIDImax
  6534. buttonStillDown
  6535. position
  6536. MIDIctr
  6537. MIDImax
  6538. buttonUp
  6539. seek MIDIFile to
  6540. tbkMCIchk
  6541. MIDIctr
  6542. MIDImax
  6543. Restart Clip
  6544. "Start Position" 
  6545. "Please 
  6546. a clip 
  6547. tbkMCIchk("seek MIDIfile 
  6548. " && 
  6549. [,"",1)
  6550. buttonDown
  6551. buttonDown
  6552. Start Position
  6553. Please select a clip first.
  6554. seek MIDIfile to
  6555. Start Position
  6556. tbkMCIchk
  6557. Play Clip
  6558. "Start Position" 
  6559. "Please 
  6560. a clip 
  6561. tbkMCIchk("play MIDIfile 
  6562. " && 
  6563. \&& \
  6564. " && 
  6565. "End 
  6566. o,"",1)
  6567. yieldApp()
  6568. buttonDown
  6569. buttonDown
  6570. Start Position
  6571. Please select a clip first.
  6572. play MIDIfile from
  6573. Start Position
  6574. End Position
  6575. tbkMCIchk
  6576. yieldApp
  6577. Start Clip
  6578. tbkMCIchk("status MIDIfile 
  6579. ","",1,1)
  6580. "Start Position"
  6581. buttonDown
  6582. buttonDown
  6583. status MIDIfile position
  6584. tbkMCIchk
  6585. Start Position
  6586. Start Clip
  6587. End Clip
  6588. tbkMCIchk("status MIDIfile 
  6589. ","",1,1)
  6590. "End Position"
  6591. buttonDown
  6592. buttonDown
  6593. status MIDIfile position
  6594. tbkMCIchk
  6595. End Position
  6596. End Clip
  6597. Make A MIDI Clip Button
  6598. ZfileName, startPos, endPos
  6599. "Start Position" 
  6600. "Please 
  6601. a clip 
  6602. "End 
  6603. setDefaultButtonStyle
  6604. 2000,750
  6605. "MIDI File Clip"
  6606. }" & CRLF & TAB & \
  6607. tbkMCI(""
  6608. " && 
  6609.  && "alias clipAlias"",
  6610. )" & 
  6611. ms"",
  6612. )" & 
  6613. Uplay 
  6614. " && 
  6615.  && \
  6616. " && 
  6617.  && "wait"",
  6618. )" & 
  6619. close 
  6620. )" & 
  6621. Bthat plays" && 
  6622.  && "
  6623. " && 
  6624.  && \
  6625. " && 
  6626.  && "has been copied 
  6627. the clipboard."
  6628. buttonUp
  6629. buttonUp
  6630. Start Position
  6631. Please select a clip first.
  6632. Start Position
  6633. End Position
  6634. setDefaultButtonStyle
  6635. MIDI File Clip
  6636. to handle buttonUp
  6637. get tbkMCI("open
  6638. alias clipAlias","")
  6639. get tbkMCI("set clipAlias time format ms","")
  6640. get tbkMCI("play clipAlias from
  6641. wait","")
  6642. get tbkMCI("close clipAlias","")
  6643. A button that plays
  6644. has been copied to the clipboard.
  6645. fileName
  6646. startPos
  6647. endPos
  6648. Make A MIDI Clip Button
  6649. Generic:  3D Objects
  6650. MIDI sequencer:  Status
  6651. "capabilityResults"
  6652. "statusResults"
  6653. leavePage
  6654. leavePage
  6655. capabilityResults
  6656. statusResults
  6657. The Update buttons scripts walk through the  textlines  of the Capability and Status fields and queries the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status Results fields.
  6658. The  Capability  button queries the MIDI sequencer device; the  Status  button queries a MIDI file.e.
  6659.  MIDIfile : an alias used for the Play and Wait, and Play and Notify buttons' MIDI files.
  6660.  s__tempoMax :  a system variable used by the tempo slider containing the maximum tempo value for the current MIDI file. the current MIDI file.
  6661. editScript "
  6662. B"update capability"
  6663. buttonDown
  6664. buttonDown
  6665. editScript
  6666. step i from 1 to textLineCount(it)
  6667. update capability
  6668. editscript "tbkMCI(""capability", 
  6669. B"Update Capability"
  6670. buttonDown
  6671. buttonDown
  6672. editscript
  6673. tbkMCI("capability
  6674. Update Capability
  6675. editscript "tbkMCI(""status", 
  6676. B"Update Status"
  6677. buttonDown
  6678. buttonDown
  6679. editscript
  6680. tbkMCI("status
  6681. Update Status
  6682.  MIDIfile :  an alias for the MIDI file opened in the Update Status button's script.
  6683. editScript "alias midiFile", 
  6684. B"update status"
  6685. buttonDown
  6686. buttonDown
  6687. editScript
  6688. alias midiFile
  6689. update status
  6690. MIDI Sequencer
  6691. Capability and Statusus
  6692. txclassname
  6693. 3DFrame Recessed
  6694. Status
  6695. Status
  6696. status
  6697. Ready
  6698. Length
  6699. Position
  6700. Number of tracks
  6701. Current track
  6702. Tempo
  6703. Division type
  6704. Offsetumber of tracks
  6705. Current trackrack
  6706. Current track
  6707. statusResults
  6708. txclassname
  6709. 3DFrame Recessed
  6710. Capabilityes
  6711. Capabilityes
  6712. capability
  6713. Can record
  6714. Device type
  6715. Has audio
  6716. Has video
  6717. Compound device
  6718. Has files
  6719. Outputs
  6720. Inputs
  6721. capabilityResults
  6722. Update capability
  6723. Zcapability
  6724. "capabilityResults"
  6725. tbkMCI("
  6726. sequencer","")
  6727. / && 
  6728. ,"") & \
  6729.             CRLF 
  6730. bclose 
  6731. buttonDown
  6732. buttonDown
  6733. capabilityResults
  6734. open sequencer
  6735. tbkMCI
  6736. capability
  6737. capability sequencer
  6738. tbkMCI
  6739. close sequencer
  6740. tbkMCI
  6741. capabilityResults
  6742. capability
  6743. Update Capability
  6744. Update Status
  6745. Zstatus
  6746. "statusResults"
  6747. OpenDlg(".", "*.
  6748. g", "Choose a MIDI file 
  6749. B.", "
  6750. File")
  6751. tbkMCI("
  6752. " && 
  6753. && "alias midiFile","")
  6754. . && 
  6755. ,"") & \
  6756.             CRLF 
  6757. rclose 
  6758. buttonDown
  6759. buttonDown
  6760. statusResults
  6761. *.mid
  6762. Choose a MIDI file for this button.
  6763. Choose MIDI File
  6764. OpenDlg
  6765. statusResults
  6766. alias midiFile
  6767. tbkMCI
  6768. status
  6769. status midiFile
  6770. tbkMCI
  6771. close midiFile
  6772. tbkMCI
  6773. statusResults
  6774. status
  6775. fileName
  6776. D:\MM\tb2.mid
  6777. Update Status
  6778. MIDI Sequencer:  MIDI To Wave
  6779. 4s_kHz, s_Channels, recording
  6780. FALSE
  6781. B"11025" 
  6782. 11025
  6783. "stereoMono" 
  6784. B"1" 
  6785. "0,75.3125,0"
  6786. B"stop 
  6787. "0,75.3125,0"
  6788. B"Unload"
  6789.  Wave"
  6790. --update the 
  6791. tbkMCI("status MIDIFile 
  6792. ","")
  6793. "Length"
  6794. "Position"
  6795. "Name"
  6796. "waveFileLength" 
  6797. tbkmci("
  6798. ","")
  6799. terpage
  6800. leavepage
  6801. enterpage
  6802. enterpage
  6803. 11025
  6804. stereoMono
  6805. start recording
  6806. 0,75.3125,0
  6807. stop recording
  6808. 0,75.3125,0
  6809. s_kHz
  6810. s_Channels
  6811. recording
  6812. leavepage
  6813. buttonDown
  6814. Unload
  6815. buttonDown
  6816. Unload Wave
  6817. status MIDIFile position
  6818. tbkMCI
  6819. Length
  6820. Position
  6821. Position
  6822. Position
  6823. waveFileLength
  6824. status waveFile position
  6825. tbkmci
  6826. recording
  6827. %^&H'T*2+V,R-
  6828. noCopy
  6829. The controls on this page let you create a wave file from a MIDI file.  Recording MIDI to a wave file will probalby result in smoother beginning and ending points than possible from the MIDI event editor on the previous page.
  6830. To use this page, first choose your sample rate (11-44 kHz), choose the number of channels (stereo or mono), and load a MIDI file by clicking the Load button.  Next open a new wave file. The Record button's text will change to white.  Click the Play button to start playing the MIDI file.  When you reach the right section of the MIDI file, click the Record button to start recording.  Click the large Stop button to stop recording.  Click the Save button to give the wave file a name and to save it.  The Unload button will close it. 
  6831. The Position and Wave File Length fields require this page's  idle  handler.  You must copy the handler into the page or background where you paste these elements if you want it to update correctly.                rrectly.  y.  ly.  e correctly.  ate correctly.  ctly.  
  6832. editScript "
  6833. buttonUp
  6834. buttonUp
  6835. editScript
  6836. to handle idle
  6837.  s_kHz : a system variable containing the sample rate used in the recording.
  6838.  s_channels : a system variable containing the number of channels used in the recording.
  6839.  recording : a system variable used as a flag to determine whether recording is occuring. containing the starting position of track 1.
  6840.  s_end : a system variable used in the Scan Forward button containing the end position of the disc.
  6841.  s_kHz : a system variable containing the sample rate used in the recording.
  6842.  s_channels : a system variable containing the number of channels used in the recording.
  6843. editScript "
  6844. s_kHz 
  6845. buttonDown
  6846. buttonDown
  6847. editScript
  6848. set s_kHz to
  6849. editScript "
  6850. s_Channels 
  6851. "stereoMono"
  6852. buttonDown
  6853. buttonDown
  6854. editScript
  6855. set s_Channels to
  6856. stereoMono
  6857. editScript "
  6858. recording 
  6859. buttonDown
  6860. buttonDown
  6861. editScript
  6862. set recording to
  6863. MIDI to Wave Converterer
  6864. tbkMCI("play d:\mm\wave.
  6865. 200 wait","")
  6866. buttonUp
  6867. buttonUp
  6868. play d:\mm\wave.wav from 100 to 200 wait
  6869. tbkMCI
  6870. fileName
  6871. d:\mm\wave.wav
  6872. Button
  6873. txclassname
  6874. 3DFrame Recessed
  6875. txclassname
  6876. 3DFrame Recessed
  6877. stereoMono
  6878. FALSE
  6879. 4s_Channels
  6880. radio 
  6881. Bthat was clicked
  6882. buttonDown
  6883. buttonUp
  6884. buttonDown
  6885. buttonUp
  6886. s_Channels
  6887. Stereo
  6888. FALSE
  6889. 4s_kHz
  6890. radio 
  6891. Bthat was clicked
  6892. buttonDown
  6893. buttonUp
  6894. buttonDown
  6895. buttonUp
  6896. s_kHz
  6897. 11025
  6898. 11 kHz
  6899. 22050
  6900. 22 kHz
  6901. 44100
  6902. 44 kHz
  6903. waveFileLength
  6904. Wave File Length:   
  6905. Restart
  6906.  rack 
  6907. Rewind  
  6908. Pause t 
  6909. Play rt 
  6910. FF n rt 
  6911. Unload  
  6912. Length
  6913. Position
  6914. Position:  ition: 
  6915. Length: onds: e:  
  6916. txclassname
  6917. 3DFrame Recessed
  6918. MIDI File: s: e:  
  6919. Stop rt 
  6920. ZfileName
  6921. a MIDI 
  6922. OpenDlg(".", "*.
  6923. g", "Please choose a 
  6924. D.", "Choose 
  6925. @File")
  6926.     --close old 
  6927. B"unload"
  6928. tbkMCIchk("
  6929. " && 
  6930.  && "alias MIDIFile","",1,1)
  6931. ms","",1)
  6932. Tstatus 
  6933. > length","",1)
  6934. buttonDown
  6935. buttonDown
  6936. *.mid
  6937. Please choose a MIDI file.
  6938. Choose MIDI File
  6939. OpenDlg
  6940. buttonDown
  6941. unload
  6942. alias MIDIFile
  6943. tbkMCIchk
  6944. set MIDIFile time format ms
  6945. tbkMCIchk
  6946. status MIDIFile length
  6947. tbkMCIchk
  6948. length
  6949. fileName
  6950. Unload
  6951. tbkMCI("close MIDIFile","")
  6952. buttonDown
  6953. buttonDown
  6954. close MIDIFile
  6955. tbkMCI
  6956. Restart
  6957. tbkMCIchk("seek MIDIFile 
  6958. 0","",1)
  6959. buttonDown
  6960. buttonDown
  6961. seek MIDIFile to 0
  6962. tbkMCIchk
  6963. Rewind
  6964. 4MIDIctr
  6965. FALSE
  6966. tbkMCI("stop MIDIfile","")
  6967. tbkMCIchk("status MIDIFile 
  6968. ","",1)
  6969. s <> 
  6970.  < 100
  6971. " && 
  6972. ,"",1)
  6973. uttonDown
  6974. buttonStillDown
  6975. buttonDown
  6976. buttonUp
  6977. buttonDown
  6978. stop MIDIfile
  6979. tbkMCI
  6980. status MIDIFile position
  6981. tbkMCIchk
  6982. MIDIctr
  6983. buttonStillDown
  6984. position
  6985. MIDIctr
  6986. buttonUp
  6987. seek MIDIFile to
  6988. tbkMCIchk
  6989. MIDIctr
  6990. Pause
  6991. tbkMCIchk("
  6992. MIDIFile","",1)
  6993. buttonDown
  6994. buttonDown
  6995. pause MIDIFile
  6996. tbkMCIchk
  6997. tbkMCIchk("Stop midiFile","",1,1)
  6998. "seek 
  6999. 0","",1)
  7000. buttonDown
  7001. buttonDown
  7002. Stop midiFile
  7003. tbkMCIchk
  7004. seek midiFile to 0
  7005. tbkMCIchk
  7006. tbkMCIchk("play MIDIFile","",1)
  7007. yieldApp()
  7008. buttonDown
  7009. buttonDown
  7010. play MIDIFile
  7011. tbkMCIchk
  7012. yieldApp
  7013. 4MIDIctr, MIDImax
  7014. FALSE
  7015. tbkMCI("stop MIDIfile","")
  7016. tbkMCIchk("status MIDIFile 
  7017. ","",1)
  7018. " && "length","",1)
  7019.  - 100
  7020. " && 
  7021. "",1)
  7022. uttonDown
  7023. buttonStillDown
  7024. buttonDown
  7025. buttonUp
  7026. buttonDown
  7027. stop MIDIfile
  7028. tbkMCI
  7029. status MIDIFile position
  7030. tbkMCIchk
  7031. status MIDIFile
  7032. length
  7033. tbkMCIchk
  7034. MIDIctr
  7035. MIDImax
  7036. buttonStillDown
  7037. position
  7038. MIDIctr
  7039. MIDImax
  7040. buttonUp
  7041. seek MIDIFile to
  7042. tbkMCIchk
  7043. MIDIctr
  7044. MIDImax
  7045. Start Recording
  7046. 4recording
  7047. tbkMCIchk("
  7048. ) waveFile","",1)
  7049. B"Stop Recording" 
  7050. "0,75.3125,0"
  7051. buttonDown
  7052. buttonDown
  7053. 0,100,0
  7054. record waveFile
  7055. tbkMCIchk
  7056. Stop Recording
  7057. 0,100,0
  7058. 0,75.3125,0
  7059. recording
  7060. Record
  7061. Stop Recording
  7062. 4recording
  7063. tbkMCIchk("stop waveFile","",1)
  7064. "0,75.3125,0"
  7065. FALSE
  7066. buttonDown
  7067. buttonDown
  7068. 0,100,0
  7069. stop waveFile
  7070. tbkMCIchk
  7071. 0,75.3125,0
  7072. start recording
  7073. 0,100,0
  7074. recording
  7075. Load MIDI
  7076. Unload  Wave
  7077. 4s_kHz, s_channels
  7078. tbkMCI("close waveFile","")
  7079. qtype waveaudio alias 
  7080. ) buffer 9","")
  7081. f" && 
  7082. o,"")
  7083. W level 2","")
  7084. m samplespersec" && 
  7085.  bitspersample 8","")
  7086.  input","")
  7087. B"Start Recording" 
  7088. "waveFileLength" 
  7089. buttonDown
  7090. buttonDown
  7091. close waveFile
  7092. tbkMCI
  7093. open new type waveaudio alias waveFile buffer 9
  7094. tbkMCI
  7095. set waveFile channels
  7096. tbkMCI
  7097. set waveFile level 2
  7098. tbkMCI
  7099. set waveFile samplespersec
  7100. tbkMCI
  7101. set waveFile bitspersample 8
  7102. tbkMCI
  7103. cue waveFile input
  7104. tbkMCI
  7105. Start Recording
  7106. 0,100,0
  7107. waveFileLength
  7108. s_kHz
  7109. s_channels
  7110. Unload Wave
  7111. 4recording
  7112. B"stop 
  7113. tbkMCI("close waveFile","")
  7114. "0,75.3125,0"
  7115. "0,75.3125,0"
  7116. "waveFileLength"
  7117. buttonDown
  7118. buttonDown
  7119. buttonDown
  7120. stop recording
  7121. close waveFile
  7122. tbkMCI
  7123. start recording
  7124. 0,75.3125,0
  7125. stop recording
  7126. 0,75.3125,0
  7127. waveFileLength
  7128. recording
  7129. Open New Wave File
  7130. Save Wave File 
  7131. 4recording
  7132. "waveFileLength" 
  7133. B"stop 
  7134. ("Enter a file 
  7135. tbkMCIchk("
  7136. " && 
  7137. ,"",1)
  7138. buttonDown
  7139. buttonDown
  7140. waveFileLength
  7141. buttonDown
  7142. stop recording
  7143. Enter a file name for this wave file.
  7144. cancel
  7145. save waveFile
  7146. tbkMCIchk
  7147. recording
  7148. Wave Audio:  Recording Controls
  7149. B"Unload"
  7150. --update the 
  7151. tbkMCI("status waveFile 
  7152. ","")
  7153. "Position"
  7154. yieldApp()
  7155. leavepage
  7156. leavepage
  7157. buttonDown
  7158. Unload
  7159. status waveFile position
  7160. tbkMCI
  7161. Position
  7162. Position
  7163. Position
  7164. yieldApp
  7165. These widgets record sound by opening a new wave file, then recording into it.  MCI also allows you to record over an existing wave file and save it under a different name.  To start, click the Open button to 
  7166.  open  a new wave file.   An  idle  handler updates the Position field by querying the status of the wave audio driver.
  7167. The Position field requires this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.  sure to forward the messages.
  7168. The Wave File, Milliseconds and Current Position fields, and the slider require this page's Idle handler.onds and Current Position fields, and the slider require this page's Idle handler. the slider require this page's Idle handler.ds, and the slider require this page's Idle handler.
  7169. editScript "
  7170. tbkMCIchk(""
  7171. buttonDown
  7172. buttonDown
  7173. editScript
  7174. get tbkMCIchk("open
  7175. editscript "
  7176. buttonDown
  7177. buttonDown
  7178. editscript
  7179. to handle idle
  7180.  waveFile : an alias for the new wave file..%    
  7181. editScript "alias waveFile", 
  7182. B"Open"
  7183. buttonDown
  7184. buttonDown
  7185. editScript
  7186. alias waveFile
  7187. Wave Audio
  7188. Recording Controlssing controls controls
  7189. Restart
  7190.  rack 
  7191. Stop  t 
  7192. Play rt 
  7193. Record  
  7194. Save Wave File 
  7195. Position
  7196. Position: sition in Milliseconds: 
  7197. txclassname
  7198. 3DFrame Recessed
  7199. label
  7200. Open New Wave File
  7201. label
  7202. Unload Wave Fileile
  7203.     --close old wave file
  7204. B"Unload"
  7205. tbkMCIchk("
  7206. qtype waveaudio alias waveFile","",1,1)
  7207. buttonDown
  7208. buttonDown
  7209. buttonDown
  7210. Unload
  7211. open new type waveaudio alias waveFile
  7212. tbkMCIchk
  7213. "Position" 
  7214. ("Enter a file 
  7215. wave 
  7216. tbkMCIchk("
  7217. waveFile" && 
  7218. ,"",1)
  7219. buttonDown
  7220. buttonDown
  7221. Position
  7222. Enter a file name for this wave file.
  7223. cancel
  7224. save waveFile
  7225. tbkMCIchk
  7226. Unload
  7227. --close the wave file
  7228. tbkMCI("
  7229. !waveFile","")
  7230. buttonDown
  7231. buttonDown
  7232. close waveFile
  7233. tbkMCI
  7234. Restart
  7235. tbkMCIchk("seek waveFile 
  7236. 0","",1)
  7237. buttonDown
  7238. buttonDown
  7239. seek waveFile to 0
  7240. tbkMCIchk
  7241. Record
  7242. tbkMCIchk("record waveFile","",1)
  7243. yieldApp()
  7244. buttonDown
  7245. buttonDown
  7246. record waveFile
  7247. tbkMCIchk
  7248. yieldApp
  7249. tbkMCIchk("stop waveFile","",1)
  7250. 0","",1)
  7251. buttonDown
  7252. buttonDown
  7253. stop waveFile
  7254. tbkMCIchk
  7255. seek waveFile to 0
  7256. tbkMCIchk
  7257. tbkMCIchk("play waveFile","",1)
  7258. yieldApp()
  7259. buttonDown
  7260. buttonDown
  7261. play waveFile
  7262. tbkMCIchk
  7263. yieldApp
  7264. Generic:  3D Objects
  7265. The 3D objects on this page are simple graphic objects that can be useful in your layouts.  These objects are actually groups; don't use too many at a time.
  7266. 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. 
  7267. 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.  
  7268. 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.
  7269. 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..up graphics that do not have to be grouped.
  7270.  txClassName : a user property for the objects on this page that need adjustment after they're resized.
  7271. editScript "txClassName 
  7272. >", tbkmmsbk()
  7273. buttonUp
  7274. buttonUp
  7275. editScript
  7276. txClassName of target
  7277. tbkmmsbk
  7278. Generic Layout Objects
  7279. 3D Objects
  7280. (this is a field)
  7281. txClassName
  7282. 3D recessed
  7283. txClassName
  7284. txClassName
  7285. txclassname
  7286. 3DFrame Recessed
  7287. txClassName
  7288. txClassName
  7289. txClassName
  7290. 3Drecessed
  7291. txClassName
  7292. 3Drecessed
  7293. txclassname
  7294. 3DFrame
  7295. Animation:  Buttons
  7296. Using the Widget font in apps
  7297. uencer: Midi File Button
  7298. Generic:  Fancy Sliders
  7299. Sliders
  7300. To learn how sliders work, read about 
  7301.  horizontal  and  vertical  sliders.
  7302. You can make your own sliders or ungroup existing sliders and add your own elements, such as a scale or a different thumb. To create a new slider group which will work automatically, follow  these rules: 
  7303. 1) The thumb can be any object with a  txClassName user property set to "hSliderThumb" or "vSliderThumb". 
  7304. 2) The thumb must be the highest layered object of the group.
  7305. 3) The bounds of the lowest layered object in the group determines the range of travel for the thumb.
  7306. 4) If you write a script for the slider or its thumb, forward all buttonDown, buttonStillDown and buttonUp messages.
  7307. 5) Don't make sliders draw direct.  If you do they'll flash as you drag them.
  7308. The TBKMM.SBK sysBook slider script is activated by the txClassName user property of the thumb object.  This property can be  "vSliderThumb"  or 
  7309.  "hSliderThumb" , depending on the orientation of the slider..
  7310. "Generic:
  7311. Horizontal Sliders"
  7312. buttonUp
  7313. buttonUp
  7314. Generic:  Horizontal Sliders
  7315. "Generic:
  7316. Vertical Sliders"
  7317. buttonUp
  7318. buttonUp
  7319. Generic:  Vertical Sliders
  7320. editScript "vsliderthumb", tbkmmsbk()
  7321. buttonUp
  7322. buttonUp
  7323. editScript
  7324. vsliderthumb
  7325. tbkmmsbk
  7326. editScript "hsliderthumb", tbkmmsbk()
  7327. buttonUp
  7328. buttonUp
  7329. editScript
  7330. hsliderthumb
  7331. tbkmmsbk
  7332.  txClassName :  a user property of the thumb objects containing either "hSliderThumb" or "vSliderThumb"
  7333. editScript "
  7334. txClassName 
  7335. >", tbkmmsbk()
  7336. buttonUp
  7337. buttonUp
  7338. editScript
  7339. get txClassName of target
  7340. tbkmmsbk
  7341. Generic Controls
  7342. Fancy Sliders 
  7343. Linked sliders:
  7344. Each of these two sliders also controls the other when you move its thumb with the mouse.  It does that by setting the other's 
  7345.  SliderPosition  property to its own.
  7346. editScript "
  7347. sliderPosition", 
  7348. "slave 1"
  7349. buttonUp
  7350. buttonUp
  7351. editScript
  7352. set sliderPosition
  7353. slave 1
  7354. Slave 0
  7355. sliderPosition 
  7356. "Slave 1" 
  7357. StillDown
  7358. buttonStillDown
  7359. buttonUp
  7360. buttonStillDown
  7361. Slave 1
  7362. sliderPosition
  7363. sliderPosition
  7364. buttonUp
  7365. Slave 1
  7366. sliderPosition
  7367. sliderPosition
  7368. 0.4451170298627926
  7369. height
  7370. defStrokeColor
  7371. 0,0,0
  7372. width
  7373. glide
  7374. button id 3 of page id 14
  7375. defFillColor
  7376. 0,100,0
  7377. txClassName
  7378. vSliderThumb
  7379. Slave 1
  7380. sliderPosition 
  7381. "Slave 0" 
  7382. StillDown
  7383. buttonStillDown
  7384. buttonUp
  7385. buttonStillDown
  7386. Slave 0
  7387. sliderPosition
  7388. sliderPosition
  7389. buttonUp
  7390. Slave 0
  7391. sliderPosition
  7392. sliderPosition
  7393. 0.4806259314456036
  7394. defStrokeColor
  7395. 0,0,0
  7396. width
  7397. glide
  7398. line id 12 of page id 14
  7399. defFillColor
  7400. 0,100,0
  7401. txClassName
  7402. HSliderThumb
  7403. 0.4806259314456036
  7404. width
  7405. glide
  7406. group id 24 of page id 14
  7407. txClassname
  7408. hSliderThumb
  7409. Believe it or not, this is a slider.  You can drag its thumb object within the range set by the bounds of the angledline.
  7410. 0.9373368146214099
  7411. SliderPosition 
  7412. %"0,00"
  7413. %"0,00"
  7414. %"0,00"
  7415. tonUp
  7416. keyUp
  7417. buttonUp
  7418. buttonStillDown
  7419. buttonUp
  7420. SliderPosition
  7421. keyUp
  7422. SliderPosition
  7423. buttonStillDown
  7424. SliderPosition
  7425. height
  7426. glide
  7427. line id 41 of page id 14
  7428. txClassName
  7429. vSliderThumb
  7430. The slider below has an invisible track.  Try it.
  7431. txclassname
  7432. 3DFrame Recessed
  7433. 0.4451170298627926
  7434. Wave Audio:  Recording Controls
  7435. Generic:  Fancy Sliders
  7436. Timers: Simple Timing Controls
  7437. Timers:  Simple Timing Controls
  7438. Generic:  Horizontal Sliders
  7439. just displays the slider 
  7440. thumb 
  7441. being moved
  7442. message so 
  7443. LysBook gets 
  7444. txClassName 
  7445. sliderPosition 
  7446. %"0,00"
  7447. "sposition"
  7448. "sPosition"
  7449. buttonstilldown
  7450. buttonup
  7451. leavePage
  7452. buttonstilldown
  7453. txClassName
  7454. thumb
  7455. sliderPosition
  7456. sposition
  7457. buttonup
  7458. sPosition
  7459. leavePage
  7460. sPosition
  7461. (h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0
  7462. Sliders are groups. The topmost object is called a "thumb" object. You can do two things with sliders:  Read their position and set their position.  
  7463. To get the position of a slider, get its SliderPosition.  To set the position, set its SliderPosition.  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.
  7464. You can get the position of a slider on buttonStillDown and buttonUp messages.  Make sure to include a 
  7465.  forward  statement in these handlers so the sysBook receives the button messages too.
  7466. The TBKMM.SBK sysBook slider script is activated by the txClassName user property of the thumb object.  This property can be  "vSliderThumb"  or 
  7467.  "hSliderThumb" , depending on the orientation of the slider.  The script for this page intercepts  buttonStillDown  and  buttonUp  messages to display the slider position.
  7468. editScript "    
  7469. buttonUp
  7470. buttonUp
  7471. editScript
  7472.     forward
  7473. editScript "vsliderthumb", tbkmmsbk()
  7474. buttonUp
  7475. buttonUp
  7476. editScript
  7477. vsliderthumb
  7478. tbkmmsbk
  7479. editScript "hsliderthumb", tbkmmsbk()
  7480. buttonUp
  7481. buttonUp
  7482. editScript
  7483. hsliderthumb
  7484. tbkmmsbk
  7485. editScript "
  7486. buttonUp
  7487. buttonUp
  7488. editScript
  7489. to handle buttonStillDown
  7490. editScript "
  7491. buttonUp
  7492. buttonUp
  7493. editScript
  7494. to handle buttonUp
  7495.  txClassName :  a user property of the thumb objects containing either "hSliderThumb" or "vSliderThumb"
  7496. editScript "
  7497. txClassName 
  7498. >", tbkmmsbk()
  7499. buttonUp
  7500. buttonUp
  7501. editScript
  7502. get txClassName of target
  7503. tbkmmsbk
  7504. Generic Controls
  7505. Horizontal Sliderss
  7506. 0.5743801652892562
  7507. txClassName
  7508. Slider
  7509. follower
  7510. rectangle id 6 of page id 15
  7511. width
  7512. glide
  7513. roundedrectangle id 54 of page id 15
  7514. txClassName
  7515. hSliderThumb
  7516. Button
  7517. 0.3993855606758833
  7518. txClassName
  7519. Slider
  7520. txClassName
  7521. hSliderThumb
  7522. glide
  7523. group id 101 of page id 15
  7524. width
  7525. follower
  7526. rectangle id 6 of page id 15
  7527. Button
  7528. 0.3613138686131387
  7529. txClassName
  7530. Slider
  7531. h!T!txClassName
  7532. hSliderThumb
  7533. !v!glide
  7534. roundedrectangle id 76 of page id 15
  7535. !width
  7536. !follower
  7537. rectangle id 6 of page id 15
  7538. Button
  7539. `"F"s
  7540. 0.7471264367816092
  7541. t"txClassName
  7542. Slider
  7543. "hilight
  7544. false
  7545. "width
  7546. #glide
  7547. button id 103 of page id 15
  7548. F#txClassName
  7549. hSliderThumb
  7550. Button
  7551. 0.5128205128205128
  7552. #txClassName
  7553. Slider
  7554. `$L$txClassName
  7555. hSliderThumb
  7556. $n$glide
  7557. button id 107 of page id 15
  7558. $width
  7559. $hilight
  7560. false
  7561. Button
  7562. 0.346512661039538
  7563. F%txClassName
  7564. Slider
  7565. %width
  7566. %glide
  7567. line id 111 of page id 15
  7568. &txClassName
  7569. hSliderThumb
  7570. 0.2825979176995538
  7571. &txClassName
  7572. Slider
  7573. :74    k
  7574. 4' 'txClassName
  7575. hSliderThumb
  7576. b'B'glide
  7577. line id 118 of page id 15
  7578. p'width
  7579. sposition
  7580. sposition
  7581. Slider Position:
  7582. Animation:  Status
  7583. es & Status
  7584. "capabilityResults"
  7585. "statusResults"
  7586. leavePage
  7587. leavePage
  7588. capabilityResults
  7589. statusResults
  7590. To use these status panels in your application, copy all the objects on the page and examine the script of the Update buttons.  
  7591. How it works:  The button script simply walks through the  textlines  of the Capability and Status fields and queries the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status results fields.
  7592. The  Capability  button queries the animation device; the  Status  button queries an animation file.em, and finally uses the text again as the name of the field in which to put the item value...
  7593. editScript "
  7594. B"update capability"
  7595. buttonDown
  7596. buttonDown
  7597. editScript
  7598. step i from 1 to textLineCount(it)
  7599. update capability
  7600. editscript "tbkMCI(""capability", 
  7601. B"Update Capability"
  7602. buttonDown
  7603. buttonDown
  7604. editscript
  7605. tbkMCI("capability
  7606. Update Capability
  7607. editscript "tbkMCI(""status", 
  7608. B"Update Status"
  7609. buttonDown
  7610. buttonDown
  7611. editscript
  7612. tbkMCI("status
  7613. Update Status
  7614.  aniFile : an alias used for the animation file when displaying status items.
  7615. editscript "alias aniFile", 
  7616. B"Update Status"
  7617. buttonDown
  7618. buttonDown
  7619. editscript
  7620. alias aniFile
  7621. Update Status
  7622. Animation
  7623. Capability and Statususs
  7624.     txclassname
  7625. 3DFrame Recessed
  7626. Status
  7627. Status
  7628. status
  7629. Ready
  7630. Length
  7631. Position
  7632. Time Formatec
  7633. Number of tracks
  7634. Current track
  7635. Current trackrrent trackt trackurrent trackrent track
  7636. Current track
  7637. statusResults
  7638. capability
  7639. Can play
  7640. Can record
  7641. Can reverse
  7642. Device type
  7643. Has audio
  7644. Has video
  7645. Compound device
  7646. Windows
  7647. Capabilityes
  7648. Capabilityes
  7649. capabilityResults
  7650. Update capability
  7651. Zcapability
  7652. "capabilityResults"
  7653. tbkMCI("
  7654. animation shareable","")
  7655. 9" && 
  7656. ,"") & \
  7657.             CRLF 
  7658. mclose 
  7659. k","")
  7660. buttonDown
  7661. buttonDown
  7662. capabilityResults
  7663. open animation shareable
  7664. tbkMCI
  7665. capability
  7666. capability animation
  7667. tbkMCI
  7668. close animation
  7669. tbkMCI
  7670. capabilityResults
  7671. capability
  7672. Update Capability
  7673. Update Status
  7674. Zstatus
  7675. "statusResults"
  7676. OpenDlg(".", "*.fl?", "Please choose 
  7677. animation file.", "Choose Animation File")
  7678. tbkMCI("
  7679. " && 
  7680. && "alias aniFile","")
  7681. - && 
  7682. ,"") & \
  7683.             CRLF 
  7684. qclose 
  7685. buttonDown
  7686. buttonDown
  7687. statusResults
  7688. *.fl?
  7689. Please choose an animation file.
  7690. Choose Animation File
  7691. OpenDlg
  7692. statusResults
  7693. alias aniFile
  7694. tbkMCI
  7695. status
  7696. status aniFile
  7697. tbkMCI
  7698. close aniFile
  7699. tbkMCI
  7700. statusResults
  7701. status
  7702. fileName
  7703. D:\MM\WIDGET\mmrk.mmm
  7704. Update Status
  7705. Generic:  Vertical Sliders
  7706. Slide
  7707. just displays the slider 
  7708. thumb 
  7709. being moved
  7710. message so 
  7711. NysBook gets 
  7712. txClassName 
  7713. sliderPosition 
  7714. %"0,00"
  7715. "sposition"
  7716. "sPosition"
  7717. buttonstilldown
  7718. buttonup
  7719. leavePage
  7720. buttonstilldown
  7721. txClassName
  7722. thumb
  7723. sliderPosition
  7724. sposition
  7725. buttonup
  7726. sPosition
  7727. leavePage
  7728. sPosition
  7729. Sliders are groups. The topmost object is called a "thumb" object. You can do two things with sliders:  Read their position and set their position.  
  7730. To get the position of a slider, get its SliderPosition.  To set the position, set its SliderPosition.  The SliderPosition is always expressed as a floating point number between 0 and 1.  When the thumb object of a vertical slider is at the bottom position, its parent's SliderPosition will be 0.  If the thumb object is at the top, its parent's SliderPosition will be 1.
  7731. You can get the position of a slider on buttonStillDown and buttonUp messages.  Make sure to include a 
  7732.  forward  statement in these handlers so the sysBook receives the button messages too.
  7733. The TBKMM.SBK sysBook slider script is activated by the txClassName user property of the thumb object.  This property can be  "vSliderThumb"  or 
  7734.  "hSliderThumb" , depending on the orientation of the slider.  The script for this page intercepts  buttonStillDown  and  buttonUp  messages to display the slider position..
  7735. editScript "    
  7736. buttonUp
  7737. buttonUp
  7738. editScript
  7739.     forward
  7740. editScript "vsliderthumb", tbkmmsbk()
  7741. buttonUp
  7742. buttonUp
  7743. editScript
  7744. vsliderthumb
  7745. tbkmmsbk
  7746. editScript "hsliderthumb", tbkmmsbk()
  7747. buttonUp
  7748. buttonUp
  7749. editScript
  7750. hsliderthumb
  7751. tbkmmsbk
  7752. editScript "
  7753. buttonUp
  7754. buttonUp
  7755. editScript
  7756. to handle buttonStillDown
  7757. editScript "
  7758. buttonUp
  7759. buttonUp
  7760. editScript
  7761. to handle buttonUp
  7762.  txClassName :  a user property of the thumb objects containing either "hSliderThumb" or "vSliderThumb"
  7763. editScript "
  7764. txClassName 
  7765. >", tbkmmsbk()
  7766. buttonUp
  7767. buttonUp
  7768. editScript
  7769. get txClassName of target
  7770. tbkmmsbk
  7771. Generic Controls
  7772. Vertical Slidersrs
  7773. txClassName
  7774. Slider
  7775. height
  7776. txClassName
  7777. vSliderThumb
  7778. glide
  7779. button id 60 of page id 16
  7780. width
  7781. hilight
  7782. false
  7783. Button
  7784. 0.6428571428571428
  7785. txClassName
  7786. Slider
  7787. height
  7788. hilight
  7789. false
  7790. width
  7791. glide
  7792. button id 64 of page id 16
  7793. txClassName
  7794. vSliderThumb
  7795. txClassName
  7796. Slider
  7797. txClassName
  7798. vSliderThumb
  7799. glide
  7800. roundedrectangle id 76 of page id 16
  7801. width
  7802. hilight
  7803. false
  7804. height
  7805. 6.226650062266503e-002
  7806. txClassName
  7807. Slider
  7808.  height
  7809.  hilight
  7810. false
  7811.  width
  7812.  glide
  7813. roundedrectangle id 121 of page id 16
  7814. "!txClassName
  7815. vSliderThumb
  7816. 0.8284625158831004
  7817. !txClassName
  7818. Slider
  7819. ~"j"txClassName
  7820. vSliderThumb
  7821. "glide
  7822. button id 89 of page id 16
  7823. "width
  7824. "hilight
  7825. false
  7826. "height
  7827. N#F#s
  7828. b#txClassName
  7829. Slider
  7830. #height
  7831. #hilight
  7832. false
  7833. $width
  7834. $glide
  7835. button id 156 of page id 16
  7836. N$txClassName
  7837. vSliderThumb
  7838. Button
  7839. 0.3260869565217391
  7840. $txClassName
  7841. Slider
  7842. h%^%height
  7843. %v%glide
  7844. line id 160 of page id 16
  7845. %txClassName
  7846. vSliderThumb
  7847. "&txClassName
  7848. Slider
  7849. &height
  7850. &glide
  7851. line id 161 of page id 16
  7852. &txClassName
  7853. vSliderThumb
  7854. ^'txClassName
  7855. Slider
  7856. 'height
  7857. 'glide
  7858. line id 163 of page id 16
  7859. "(txClassName
  7860. vSliderThumb
  7861. sposition
  7862. sposition
  7863. Slider Position:
  7864. Animation:  Control Panel
  7865. 4s_aniHandle
  7866. tbkMCI("status aniFile ready","") 
  7867. ; <> 
  7868.             untranslateAllWindowMessages 
  7869. fclose 
  7870. _","")
  7871. ","")
  7872. "Name" 
  7873. "Length"
  7874. "Position"
  7875. sliderPosition 
  7876. "Slider" 
  7877. "length"
  7878. leavepage
  7879. leavepage
  7880. status aniFile ready
  7881. tbkMCI
  7882. close aniFile
  7883. tbkMCI
  7884. s_aniHandle
  7885. status aniFile position
  7886. tbkMCI
  7887. Length
  7888. Position
  7889. Slider
  7890. sliderPosition
  7891. Position
  7892. Position
  7893. Slider
  7894. sliderPosition
  7895. length
  7896. +Z0r2
  7897. fName
  7898. F:\TBKMM\MOLECULS.MMM
  7899. The controls on this page load and play an animation file in its own overlapped window.  You can drag the window anywhere on the screen.  The animation file is  opened  in the Load button script and is  closed  by the Unload button's script.
  7900. If you use controls like these for animation, you should request notification from the window when the user clicks it, or when the user breaks the animation.  On notification you can hide the animation window or move it out of the way of the controls.
  7901. The  slider control's script  is in the system book TBKMM.SBK.    The thumb button's script  seeks  to a new position in the animation file.  If you change the script of the thumb button, be sure to forward the button event messages.
  7902. The Length and Position fields, and the slider require this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.     
  7903. editScript "
  7904. tbkmcichk(""
  7905. B"load"
  7906. buttonUp
  7907. buttonUp
  7908. editScript
  7909. get tbkmcichk("open
  7910. editScript "
  7911. tbkmci(""close", 
  7912. B"unload"
  7913. buttonUp
  7914. buttonUp
  7915. editScript
  7916. get tbkmci("close
  7917. unload
  7918. editScript "
  7919. |", tbkmmsbk()
  7920. buttonDown
  7921. buttonDown
  7922. editScript
  7923. to handle buttonStillDown
  7924. tbkmmsbk
  7925. editScript "
  7926. tbkMCIchk(""seek", 
  7927. B"thumb"
  7928. buttonDown
  7929. buttonDown
  7930. editScript
  7931. get tbkMCIchk("seek
  7932. thumb
  7933. editScript "alias aniFile", 
  7934. B"load"
  7935. buttonUp
  7936. buttonUp
  7937. editScript
  7938. alias aniFile
  7939. Animation
  7940. Control Paneltrols
  7941. Restart
  7942. Track 
  7943. Rewind  
  7944. Pause t 
  7945. Play rt 
  7946. FF n rt 
  7947. Unload  
  7948. Play From....
  7949. Play To...  
  7950. Play FromToo.
  7951. slider
  7952. txClassName
  7953. Slider
  7954. thumb
  7955. --thumb 
  7956. seek animation file 
  7957. slider's 
  7958. tbkMCIchk("status aniFile length","",1,1)
  7959. sliderPosition 
  7960. " && 
  7961. ,"",1)
  7962. buttonUp
  7963. buttonUp
  7964. status aniFile length
  7965. tbkMCIchk
  7966. sliderPosition
  7967. seek aniFile to
  7968. tbkMCIchk
  7969. defStrokeColor
  7970. 0,0,0
  7971. width
  7972. glide
  7973. line id 105 of page id 9
  7974. defFillColor
  7975. 0,100,0
  7976. txClassName
  7977. HSliderThumb
  7978. Length
  7979. Position
  7980. Position: sition: 
  7981. Length: onds: e:  
  7982. txclassname
  7983. 3DFrame Recessed
  7984. Animation File:   
  7985. fileName
  7986. c:\tbkmm2\mmrk.mmm
  7987. Rewind
  7988. tbkMCIchk("status aniFile 
  7989. ","",1)
  7990. $("seek 
  7991. " && 
  7992. b(0, 
  7993. - 10),"")
  7994. buttonStillDown
  7995. buttonStillDown
  7996. status aniFile position
  7997. tbkMCIchk
  7998. seek aniFile to
  7999. tbkMCI
  8000. Step Reverse
  8001. tbkMCIchk("
  8002. aniFile","",1,1)
  8003.  reverse 
  8004. H1","",1)
  8005. buttonDown
  8006. buttonDown
  8007. pause aniFile
  8008. tbkMCIchk
  8009. step aniFile reverse by 1
  8010. tbkMCIchk
  8011. Pause
  8012. tbkMCIchk("
  8013. aniFile","")
  8014. buttondown
  8015. buttondown
  8016. pause aniFile
  8017. tbkMCIchk
  8018. Step Forward
  8019. tbkMCIchk("
  8020. aniFile","",1,1)
  8021. H1","",1)
  8022. buttonDown
  8023. buttonDown
  8024. pause aniFile
  8025. tbkMCIchk
  8026. step aniFile by 1
  8027. tbkMCIchk
  8028. tbkMCIchk("play aniFile","",1)
  8029. yieldApp()
  8030. buttonDown
  8031. buttonDown
  8032. play aniFile
  8033. tbkMCIchk
  8034. yieldApp
  8035. tbkMCIchk("status aniFile 
  8036. ","",1)
  8037. $("seek 
  8038. " && 
  8039. "length", 
  8040. + 10),"")
  8041. buttonStillDown
  8042. buttonStillDown
  8043. status aniFile position
  8044. tbkMCIchk
  8045. seek aniFile to
  8046. length
  8047. tbkMCI
  8048. Unload
  8049.  aniFile : an alias for the current animation file.
  8050.  s_aniHandle : a system variable containing the handle to the animation window.
  8051. Restart
  8052. tbkMCI("seek aniFile 
  8053. 1","")
  8054. buttondown
  8055. buttondown
  8056. seek aniFile to 1
  8057. tbkMCI
  8058. Play From
  8059. ("Play 
  8060. frame 
  8061. tbkMCIchk("play aniFile 
  8062. " && 
  8063. ,"",1)
  8064. buttonDown
  8065. buttonDown
  8066. Play from frame number
  8067. play aniFile from
  8068. tbkMCIchk
  8069. Play To
  8070. "Length"
  8071. ("Play 
  8072. frame 
  8073. tbkMCIchk("play aniFile 
  8074. " && 
  8075. ,"",1)
  8076. buttonDown
  8077. buttonDown
  8078. Length
  8079. Play to frame number
  8080. play aniFile to
  8081. tbkMCIchk
  8082. Play From To
  8083. "Length"
  8084. ("Play 
  8085. frame 
  8086. f"1," & 
  8087. tbkMCIchk("play aniFile 
  8088. " && 
  8089.             && 
  8090. ,"",1)
  8091. buttonDown
  8092. buttonDown
  8093. Length
  8094. Play from frame number, to frame number
  8095. play aniFile from
  8096. tbkMCIchk
  8097. 4s_aniHandle
  8098.     --close animation file
  8099. tbkMCI("status aniFile ready","") 
  8100. P <> 
  8101.             untranslateAllWindowMessages 
  8102. X","")
  8103. buttondown
  8104. buttondown
  8105. status aniFile ready
  8106. tbkMCI
  8107. close aniFile
  8108. tbkMCI
  8109. s_aniHandle
  8110. editScript "
  8111. s_aniHandle", 
  8112. B"load"
  8113. buttonDown
  8114. buttonDown
  8115. editScript
  8116. set s_aniHandle
  8117. Videodisc:  Event Editor
  8118. Widget Font Quick Reference
  8119. Wave Audio:  Event Editor
  8120. Generic:  Audio Mixer
  8121. Animation: More Buttons
  8122. Animation:  More Buttons
  8123. Animation:  Buttons
  8124. vents
  8125. tbkMCI("close aniFile","")
  8126. leavePage
  8127. leavePage
  8128. close aniFile
  8129. tbkMCI
  8130. MCI lets you display animation files in their own windows.  See the  Window Styles  reference page to learn about different types of windows.
  8131. To display an animation file in your own application, copy a Generic button to your book and  right click  it in Reader mode.  You'll be prompted for a file name.  That file name will be stored as a user property of the button.
  8132. These buttons close their animation files automatically when they're done playing. The Manual Close buttons require you to click the animation window to close their files.  Or in the case of the overlapped window, close its window by pressing Alt+F4.  These buttons use the 
  8133.  translateWindowMessage  control structure to trap mouse clicks in the bitmap window, which sends a ToolBook message to close the bitmap file.  The Ovelapped button also traps a windows  Close Window  message.  If you use the translateWindowMessage structure, you must first show the animation window when using Popup or Overlapped window styles.
  8134. eStyles"
  8135. buttonDown
  8136. buttonDown
  8137. window Styles
  8138. editScript "
  8139. B"Popup, Auto Close"
  8140. buttonDown
  8141. buttonDown
  8142. editScript
  8143. to handle rightButtonUp
  8144. Popup, Auto Close
  8145.  aniFile : an alias for the current animation file.
  8146.  s_aniHandle : a system variable used in the Manual buttons' scripts containing the handle to the manually closed animation windows.
  8147. editScript "alias aniFile", 
  8148. B"Popup, Auto close"
  8149. buttonDown
  8150. buttonDown
  8151. editScript
  8152. alias aniFile
  8153. Popup, Auto close
  8154. Animation
  8155. Generic Animation Buttons 1
  8156. Popup, Auto Close
  8157. ofileName
  8158. tbkMCI("close aniFile","")
  8159. tbkMCIchk("
  8160. " && 
  8161. U && "alias 
  8162. . style popup", "",1,1)
  8163. N state 
  8164. ","",1)
  8165. Tplay 
  8166. k wait","",1)
  8167. OpenDlg(".", "*.fl?", "Choose 
  8168. animation 
  8169. B.", "
  8170. Animation 
  8171. buttonDown
  8172. rightButtonUp
  8173. buttonDown
  8174. fileName
  8175. prightButtonUp
  8176. close aniFile
  8177. tbkMCI
  8178. fileName
  8179. alias aniFile style popup
  8180. tbkMCIchk
  8181. window aniFile state show
  8182. tbkMCIchk
  8183. play aniFile wait
  8184. tbkMCIchk
  8185. close aniFile
  8186. tbkMCI
  8187. rightButtonUp
  8188. *.fl?
  8189. Choose an animation file for this button.
  8190. Choose Animation File
  8191. OpenDlg
  8192. fileName
  8193. fileName
  8194. Popup
  8195. Child, Auto Close
  8196. ofileName
  8197. tbkMCI("close aniFile","")
  8198. tbkMCIchk("
  8199. " && 
  8200. U && "alias 
  8201. . style child 
  8202. " && 
  8203. , "",1,1)
  8204. Cplay 
  8205. Z wait","",1)
  8206. OpenDlg(".", "*.fl?", "Choose 
  8207. animation 
  8208. B.", "
  8209. Animation 
  8210. buttonDown
  8211. rightButtonUp
  8212. buttonDown
  8213. fileName
  8214. prightButtonUp
  8215. close aniFile
  8216. tbkMCI
  8217. fileName
  8218. alias aniFile style child parent
  8219. tbkMCIchk
  8220. play aniFile wait
  8221. tbkMCIchk
  8222. close aniFile
  8223. tbkMCI
  8224. rightButtonUp
  8225. *.fl?
  8226. Choose an animation file for this button.
  8227. Choose Animation File
  8228. OpenDlg
  8229. fileName
  8230. fileName
  8231. Child
  8232. Overlapped, Auto Close
  8233. ofileName
  8234. tbkMCI("close aniFile","")
  8235. tbkMCIchk("
  8236. " && 
  8237. U && \
  8238. " && 
  8239. && "style overlapped alias 
  8240. P,1,1)
  8241. _ state 
  8242. ","",1)
  8243. eplay 
  8244. | wait","",1)
  8245. OpenDlg(".", "*.fl?", "Choose 
  8246. animation 
  8247. B.", "
  8248. Animation 
  8249. buttonUp
  8250. rightButtonUp
  8251. buttonUp
  8252. fileName
  8253. prightButtonUp
  8254. close aniFile
  8255. tbkMCI
  8256. fileName
  8257. parent
  8258. style overlapped alias aniFile
  8259. tbkMCIchk
  8260. window aniFile state show
  8261. tbkMCIchk
  8262. play aniFile wait
  8263. tbkMCIchk
  8264. close aniFile
  8265. tbkMCI
  8266. rightButtonUp
  8267. *.fl?
  8268. Choose an animation file for this button.
  8269. Choose Animation File
  8270. OpenDlg
  8271. fileName
  8272. fileName
  8273. Overlapped
  8274. CD Audio:  Event Editor
  8275. 7`94;l<
  8276. =4<&E&E&E
  8277. noCopy
  8278. The controls on this page let you select a clip from a CD and create a button that plays that clip.  
  8279. After turning the CD audio driver on, select a clip from the disc by clicking the Start and End Clip buttons while the CD is playing.  This will set the Start and End Position Field text to current position of the CD.  You can also edit the text in the Start and End Position fields.  The End Position field text should be greater than the Start Position field text.  Click the Play Clip button to test your clip.  When you're done, click the Make A CD Audio Clip Button button.  A button that plays your clip will be copied to the clipboard.
  8280. The Driver On/Off widget  opens  and 
  8281.  closes  the device and initializes the disc.  
  8282. The Track and Position fields, as well as the slider position are updated by an 
  8283.  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.   pdate correctly.  ctly.  
  8284. editScript "
  8285. tbkMCIchk(""
  8286. cdAudio shareable""", 
  8287. "Driver switch"
  8288. buttonDown
  8289. buttonDown
  8290. editScript
  8291. get tbkMCIchk("open cdAudio shareable"
  8292. Driver switch
  8293. editScript "
  8294. tbkmci(""close cdAudio""", 
  8295. "Driver switch"
  8296. buttonDown
  8297. buttonDown
  8298. editScript
  8299. get tbkmci("close cdAudio"
  8300. Driver switch
  8301. editScript "
  8302. buttondown
  8303. buttondown
  8304. editScript
  8305. to handle idle
  8306.  s_device : a system variable used in the  idle  handler to bypass status queries if the device isn't open.
  8307.  s_idle :  a system variable use to count idle messages.
  8308.  s_start : a system variable used in the Scan Reverse button, Stop button and slider thumb containing the starting position of track 1.
  8309.  s_end : a system variable used in the Scan Forward button containing the end position of the disc.track 1.
  8310.  s_end : a system varible used in the Scan Forward button containing the end position of the disc.
  8311. editScript "
  8312. s_device 
  8313. ""cdAudio""", 
  8314. "Driver switch"
  8315. buttonUp
  8316. buttonUp
  8317. editScript
  8318. set s_device to "cdAudio"
  8319. Driver switch
  8320. editScript "
  8321. s_device 
  8322. buttonDown
  8323. buttonDown
  8324. editScript
  8325. if s_device is null
  8326. editScript "
  8327. us_idle", 
  8328. buttonDown
  8329. buttonDown
  8330. editScript
  8331. decrement s_idle
  8332. editScript "
  8333. s_start 
  8334. B"Scan Reverse"
  8335. buttonUp
  8336. buttonUp
  8337. editScript
  8338. set s_start to
  8339. Scan Reverse
  8340. editScript "
  8341. s_end 
  8342. B"Scan Forward"
  8343. buttonUp
  8344. buttonUp
  8345. editScript
  8346. set s_end to
  8347. Scan Forward
  8348. CD Audio
  8349. Event Editoror
  8350. tbkMCI("play d:\mm\wave.
  8351. 200 wait","")
  8352. buttonUp
  8353. buttonUp
  8354. play d:\mm\wave.wav from 100 to 200 wait
  8355. tbkMCI
  8356. fileName
  8357. d:\mm\wave.wav
  8358. Button
  8359. Start Position
  8360. Start Clip: on:  n  
  8361. End Position
  8362. End Clip: on: tion  
  8363. Play Clip
  8364. Restart Clipck 
  8365. Scan rt 
  8366. Skip rt 
  8367. Skip rt 
  8368. Play rt 
  8369. Scan rt 
  8370. Driver On/Off
  8371. PositionPosition
  8372. Current Track: 
  8373. Tracks on Disc  
  8374. txclassname
  8375. 3DFrame Recessed
  8376. Tracks
  8377. Track
  8378. Position
  8379. -- The 
  8380. used only 
  8381. you want 
  8382. -updating 
  8383. fits own timer.
  8384. -- To turn the 
  8385.  on, 
  8386. running 
  8387. "on" 
  8388. tbkTimer("
  8389. V shareable alias tmCDPos",
  8390.  type periodic","")
  8391.  1000","")
  8392. aplay 
  8393. vclose 
  8394. multimedia
  8395. ownerPgBkgnd 
  8396. tbkMCI("sysinfo cdaudio use count","")
  8397. (isNumber(
  8398. tbkCDAudio("status cdAudio 
  8399. ","")
  8400. Tn-2 
  8401. multimedia
  8402. running
  8403. running
  8404. open timer shareable alias tmCDPos
  8405. tbkTimer
  8406. set tmCDPos type periodic
  8407. tbkTimer
  8408. set tmCDPos period 1000
  8409. tbkTimer
  8410. play tmCDPos
  8411. tbkTimer
  8412. close tmCDPos
  8413. tbkTimer
  8414. multimedia
  8415. ownerPgBkgnd
  8416. running
  8417. sysinfo cdaudio use count
  8418. tbkMCI
  8419. isNumber
  8420. status cdAudio position
  8421. tbkCDAudio
  8422. Pause t 
  8423. Driver switch
  8424. "txclassname
  8425. vSwitchHandle
  8426. Restart
  8427. Track 
  8428. Stop rt 
  8429. Scan Reverse
  8430. 4s_start
  8431. checkDevice TRUE
  8432.     --beginning 
  8433. millisecFromMSF(tbkMCIchk("status cdAudio 
  8434. track 1","",1,1)) + 1000
  8435. ms","",1)
  8436. ","",1)
  8437.  + 5000
  8438. " && 
  8439. - 5000,"",1)
  8440. " && 
  8441. ,"",1)
  8442. msf","",1)
  8443. Play 
  8444. ","",1,1)
  8445. uttonDown
  8446. buttonStillDown
  8447. buttonDown
  8448. buttonUp
  8449. buttonDown
  8450. checkDevice
  8451. status cdAudio position track 1
  8452. tbkMCIchk
  8453. millisecFromMSF
  8454. buttonStillDown
  8455. s_start
  8456. buttonStillDown
  8457. set cdAudio time format ms
  8458. tbkMCIchk
  8459. status cdAudio position
  8460. tbkMCIchk
  8461. seek cdAudio to
  8462. tbkMCIchk
  8463. seek cdAudio to
  8464. tbkMCIchk
  8465. set cdAudio time format msf
  8466. tbkMCIchk
  8467. s_start
  8468. buttonUp
  8469. Play cdAudio
  8470. tbkMCIchk
  8471. Skip Reverse
  8472. ZmaxTracks, 
  8473. checkDevice TRUE
  8474. tbkMCIchk("status cdAudio 
  8475. tracks","",1,1)
  8476. 0Status 
  8477. 'current 
  8478. &","",1)
  8479. w <> 
  8480. ~ > 1
  8481. tmsf","",1)
  8482. play 
  8483. " && (
  8484.  - 1) & ":00:00:00","",1)
  8485. buttonDown
  8486. buttonDown
  8487. checkDevice
  8488. status cdAudio number of tracks
  8489. tbkMCIchk
  8490. Status cdAudio current track
  8491. tbkMCIchk
  8492. set cdAudio time format tmsf
  8493. tbkMCIchk
  8494. play cdAudio from
  8495. :00:00:00
  8496. tbkMCIchk
  8497. set cdAudio time format msf
  8498. tbkMCIchk
  8499. maxTracks
  8500. Track
  8501. Restart Track
  8502. Ztrack
  8503. checkDevice TRUE
  8504. tbkMCIchk("Status cdAudio current 
  8505. @","",1,1)
  8506. tmsf","",1)
  8507. Fplay 
  8508. " && 
  8509. v & ":00:00:00","",1)
  8510. buttonDown
  8511. buttonDown
  8512. checkDevice
  8513. Status cdAudio current track
  8514. tbkMCIchk
  8515. set cdAudio time format tmsf
  8516. tbkMCIchk
  8517. play cdAudio from
  8518. :00:00:00
  8519. tbkMCIchk
  8520. set cdAudio time format msf
  8521. tbkMCIchk
  8522. track
  8523. Pause
  8524. checkDevice TRUE
  8525. tbkMCIchk("Pause cdAudio","",1)
  8526. buttonDown
  8527. buttonDown
  8528. checkDevice
  8529. Pause cdAudio
  8530. tbkMCIchk
  8531. checkDevice TRUE
  8532. tbkMCIchk("Stop cdAudio","",1,1)
  8533. ms","",1)
  8534. 8status 
  8535. track 1","",1) + 1000
  8536. _seek 
  8537. " && 
  8538. ,"",1)
  8539. msf","",1)
  8540. buttonDown
  8541. buttonDown
  8542. checkDevice
  8543. Stop cdAudio
  8544. tbkMCIchk
  8545. set cdAudio time format ms
  8546. tbkMCIchk
  8547. status cdAudio position track 1
  8548. tbkMCIchk
  8549. seek cdAudio to
  8550. tbkMCIchk
  8551. set cdAudio time format msf
  8552. tbkMCIchk
  8553. Skip Forward
  8554. ZmaxTracks, 
  8555. checkDevice TRUE
  8556. tbkMCIchk("status cdAudio 
  8557. tracks","",1,1)
  8558. 0Status 
  8559. 'current 
  8560. &","",1)
  8561. w <> 
  8562. tmsf","",1)
  8563. play 
  8564. " && (
  8565.  + 1) & ":00:00:00","",1)
  8566. buttonDown
  8567. buttonDown
  8568. checkDevice
  8569. status cdAudio number of tracks
  8570. tbkMCIchk
  8571. Status cdAudio current track
  8572. tbkMCIchk
  8573. set cdAudio time format tmsf
  8574. tbkMCIchk
  8575. play cdAudio from
  8576. :00:00:00
  8577. tbkMCIchk
  8578. set cdAudio time format msf
  8579. tbkMCIchk
  8580. maxTracks
  8581. Track
  8582. checkDevice TRUE
  8583. tbkMCIchk("Play cdAudio","",1,1)
  8584. buttonDown
  8585. buttonDown
  8586. checkDevice
  8587. Play cdAudio
  8588. tbkMCIchk
  8589. Scan Forward
  8590. 4s_end
  8591. checkDevice TRUE
  8592. millisecFromMSF(tbkMCIchk("status cdAudio length","",1,1))
  8593. ms","",1)
  8594. ","",1)
  8595.  - 5000
  8596. zeek 
  8597. " && 
  8598. + 5000,"",1)
  8599. " && 
  8600. ,"",1)
  8601. msf","",1)
  8602. Play 
  8603. ","",1,1)
  8604. uttonDown
  8605. buttonStillDown
  8606. buttonDown
  8607. buttonUp
  8608. buttonDown
  8609. checkDevice
  8610. status cdAudio length
  8611. tbkMCIchk
  8612. millisecFromMSF
  8613. buttonStillDown
  8614. s_end
  8615. buttonStillDown
  8616. set cdAudio time format ms
  8617. tbkMCIchk
  8618. status cdAudio position
  8619. tbkMCIchk
  8620. seek cdAudio to
  8621. tbkMCIchk
  8622. seek cdAudio to
  8623. tbkMCIchk
  8624. set cdAudio time format msf
  8625. tbkMCIchk
  8626. s_end
  8627. buttonUp
  8628. Play cdAudio
  8629. tbkMCIchk
  8630. Restart Clip
  8631. "Start Position" 
  8632. "Please 
  8633. a clip 
  8634. tbkMCIchk("seek cdAudio 
  8635. " && 
  8636. Z,"",1)
  8637. buttonDown
  8638. buttonDown
  8639. Start Position
  8640. Please select a clip first.
  8641. seek cdAudio to
  8642. Start Position
  8643. tbkMCIchk
  8644. Play Clip
  8645. "Start Position" 
  8646. "Please 
  8647. a clip 
  8648. tbkMCIchk("play cdAudio 
  8649. " && 
  8650. [&& \
  8651. " && 
  8652. "End 
  8653. n,"",1)
  8654. yieldApp()
  8655. buttonDown
  8656. buttonDown
  8657. Start Position
  8658. Please select a clip first.
  8659. play cdAudio from
  8660. Start Position
  8661. End Position
  8662. tbkMCIchk
  8663. yieldApp
  8664. Start Clip
  8665. tbkMCIchk("status cdAudio 
  8666. ","",1,1)
  8667. "Start Position"
  8668. buttonDown
  8669. buttonDown
  8670. status cdAudio position
  8671. tbkMCIchk
  8672. Start Position
  8673. Start Clip
  8674. End Clip
  8675. tbkMCIchk("status cdAudio 
  8676. ","",1,1)
  8677. "End Position"
  8678. buttonDown
  8679. buttonDown
  8680. status cdAudio position
  8681. tbkMCIchk
  8682. End Position
  8683. End Clip
  8684. Make A CD Audio Clip Button
  8685. Make A CD Audio Clip Button
  8686. ofileName
  8687. rightButtonup
  8688. B's bitmap 
  8689. fa popup 
  8690. tbkBitmapchk("
  8691. " && 
  8692. d && "alias dibFile style child 
  8693. " && sysClientHandle, 1, 1)
  8694. " && 
  8695. ox & "," & 
  8696. oy,1)
  8697. kate 
  8698. translating 
  8699. emessages 
  8700. bmpHandle 
  8701. ("status 
  8702.     translatewindowmessage 
  8703. bmpButtonup 
  8704. --dismiss 
  8705. they click 
  8706. BMPbuttonUp 
  8707.     untranslateAllWindowMessages 
  8708. ("close 
  8709. OpenDlg(".", "*.*", "Choose a 
  8710. (.dib 
  8711.  extensions)", "
  8712. ox & "," & 
  8713. "0,0"
  8714. ("Would you like 
  8715. specify 
  8716. e? If so, please enter 2 numeric coordinates." 
  8717. ) <> 2
  8718. "Invalid 
  8719. x"0" 
  8720. xisNumber(
  8721. "Coordinate 
  8722. z" && i && "
  8723. tonUp
  8724. BMPbuttonUp
  8725. buttonUp
  8726. rightButtonUp
  8727. buttonUp
  8728. fileName
  8729. prightButtonup
  8730. fileName
  8731. alias dibFile style child parent
  8732. tbkBitmapchk
  8733. window dibFile position
  8734. tbkBitmapchk
  8735. window dibFile state show
  8736. tbkBitmapchk
  8737. status dibFile window
  8738. tbkBitmap
  8739. bmpButtonup
  8740. bmpHandle
  8741. BMPbuttonUp
  8742. close dibFile
  8743. tbkBitmap
  8744. bmpHandle
  8745. rightButtonUp
  8746. Choose a bitmap file for this button.  (.dib or .bmp extensions)
  8747. Choose Bitmap File
  8748. OpenDlg
  8749. fileName
  8750. fileName
  8751. Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
  8752. cancel
  8753. Invalid number of coordinates.
  8754. isNumber
  8755. Coordinate number
  8756. is not a number.
  8757. 4s_aniHandle
  8758. ZfileName
  8759. a animation 
  8760. OpenDlg(".", "*.fl?", "Please choose 
  8761. J.", "Choose Animation File")
  8762. tbkMCI("status aniFile ready","") 
  8763.             untranslateAllWindowMessages 
  8764. fclose 
  8765. _","")
  8766. tbkMCIchk("
  8767. " && 
  8768.  && "alias 
  8769. " && 
  8770. 8,"",1,1)
  8771. frames","",1)
  8772. "length" 
  8773. ,"",1)
  8774. yseek 
  8775. 1","",1)
  8776. state 
  8777. ","",1)
  8778. translating 
  8779. emessages 
  8780. ","",1)
  8781.     translateWindowMessage 
  8782. animateWindowClose 
  8783. --This handles 
  8784. closes 
  8785. edirectly (Alt-f4)
  8786.     --Start timer 
  8787. efinish its 
  8788. Fclean 
  8789. finished
  8790.     unTranslateAllWindowMessages 
  8791. tbkTimerStart("single",500,100,
  8792. tbkMMTimer
  8793. ","")
  8794. uttonDown
  8795. animateWindowClose
  8796. buttonDown
  8797. tbkMMTimer
  8798. buttonDown
  8799. *.fl?
  8800. Please choose an animation file.
  8801. Choose Animation File
  8802. OpenDlg
  8803. status aniFile ready
  8804. tbkMCI
  8805. close aniFile
  8806. tbkMCI
  8807. alias aniFile parent
  8808. tbkMCIchk
  8809. set aniFile time format frames
  8810. tbkMCIchk
  8811. length
  8812. status aniFile length
  8813. tbkMCIchk
  8814. seek aniFile to 1
  8815. tbkMCIchk
  8816. window aniFile state show
  8817. tbkMCIchk
  8818. status aniFile window handle
  8819. tbkMCIchk
  8820. animateWindowClose
  8821. fileName
  8822. s_aniHandle
  8823. animateWindowClose
  8824. single
  8825. tbkTimerStart
  8826. s_aniHandle
  8827. tbkMMTimer
  8828. close aniFile
  8829. tbkMCI
  8830. Generic Controls: Event Editor
  8831. Videodisc:  Simple Controls
  8832. Index
  8833. CD Audio:  Small Simple Controls
  8834.  P!\%>(F)*,4-
  8835. 5:7\:
  8836. =tAdExF
  8837. The Driver On/Off switch  opens  and 
  8838.  closes  the device and initializes the disc.  The slider position, as well as the track and position fields are updated by an  idle  handler which queries the status of the CD audio driver.
  8839. The  slider control's script  is in the system book TBKMM.SBK.  The thumb button's script  plays  from a new position on the disc.  If you change the script of the thumb button, be sure to forward the button event messages.
  8840. Most of the widgets on this page require this page's script.  Each button control sends a  checkDevice  message. The checkDevice handler in the page script makes sure the driver switch has been turned on. Status fields are update by the page script's idle handler.  
  8841. The first few seconds of a CD are not addressable, so you can't seek to or play from position zero.  However you can play from the position of the first track, or seek to the position of the first track plus one second................. one second.
  8842. editScript "
  8843. tbkMCIchk(""
  8844. cdAudio shareable""", 
  8845. "Driver switch"
  8846. buttonDown
  8847. buttonDown
  8848. editScript
  8849. get tbkMCIchk("open cdAudio shareable"
  8850. Driver switch
  8851. editScript "
  8852. tbkmci(""close cdAudio""", 
  8853. "Driver switch"
  8854. buttonDown
  8855. buttonDown
  8856. editScript
  8857. get tbkmci("close cdAudio"
  8858. Driver switch
  8859. editScript "
  8860. buttondown
  8861. buttondown
  8862. editScript
  8863. to handle idle
  8864. editScript "
  8865. |", tbkmmsbk()
  8866. buttonDown
  8867. buttonDown
  8868. editScript
  8869. to handle buttonStillDown
  8870. tbkmmsbk
  8871. editScript "
  8872. tbkMCIchk(""play cdAudio 
  8873. B"thumb"
  8874. buttonDown
  8875. buttonDown
  8876. editScript
  8877. get tbkMCIchk("play cdAudio from
  8878. thumb
  8879. editScript "
  8880. checkDevice", 
  8881. buttonDown
  8882. buttonDown
  8883. editScript
  8884. to handle checkDevice
  8885.  s_device : a system variable used in the  idle  handler to bypass status queries if the device isn't open.
  8886.  s_idle :  a system variable use to count idle messages.
  8887.  s_prompt : a system variable containing the last value entered when prompting for the play from/to positions.
  8888.  s_start : a system variable used in the Scan Reverse button, Stop button and slider thumb containing the starting position of track 1.
  8889.  s_end : a system variable used in the Scan Forward button containing the end position of the disc.c.
  8890. editScript "
  8891. s_device 
  8892. ""cdAudio""", 
  8893. "Driver switch"
  8894. buttonUp
  8895. buttonUp
  8896. editScript
  8897. set s_device to "cdAudio"
  8898. Driver switch
  8899. editScript "
  8900. s_device 
  8901. buttonDown
  8902. buttonDown
  8903. editScript
  8904. if s_device is null
  8905. editScript "
  8906. us_idle", 
  8907. buttonDown
  8908. buttonDown
  8909. editScript
  8910. decrement s_idle
  8911. editScript "
  8912. tbkMCIchk(""play cdAudio 
  8913. "" && s_prompt", 
  8914. buttonUp
  8915. buttonUp
  8916. editScript
  8917. get tbkMCIchk("play cdAudio from" && s_prompt
  8918. play from
  8919. editScript "
  8920. s_start 
  8921. B"Scan Reverse"
  8922. buttonUp
  8923. buttonUp
  8924. editScript
  8925. set s_start to
  8926. Scan Reverse
  8927. editScript "
  8928. s_end 
  8929. B"Scan Forward"
  8930. buttonUp
  8931. buttonUp
  8932. editScript
  8933. set s_end to
  8934. Scan Forward
  8935. CD Audio
  8936. Small Simple ControlsControlsControlsontrols
  8937. Restart
  8938. Track 
  8939. Scan rt 
  8940. Skip rt 
  8941. Pause t 
  8942. Skip rt 
  8943. Play rt 
  8944. Scan rt 
  8945. Eject t 
  8946. Stop rt 
  8947. Play Track
  8948. Play From....
  8949. Play To...  
  8950. Play FromToo.
  8951. Position:
  8952. Current Track: 
  8953. Tracks on Disc: 
  8954. txclassname
  8955. 3DFrame Recessed
  8956. Driver On/Off
  8957. Slider
  8958. thumb
  8959. --thumb 
  8960. play cd audio 
  8961. slider 
  8962. Zlen, startDisc
  8963. checkDevice TRUE
  8964. tbkMCIchk("
  8965. cdaudio 
  8966. ms","",1,1)
  8967. 'status 
  8968. $length","",1,1)
  8969. (SliderPosition 
  8970. <cdAudio 
  8971. track 1","",1) + 1000
  8972. " && 
  8973. ,"",1)
  8974. msf","",1)
  8975. buttonUp
  8976. buttonUp
  8977. checkDevice
  8978. set cdaudio time format ms
  8979. tbkMCIchk
  8980. status cdaudio length
  8981. tbkMCIchk
  8982. SliderPosition
  8983. status cdAudio position track 1
  8984. tbkMCIchk
  8985. play cdaudio from
  8986. tbkMCIchk
  8987. set cdAudio time format msf
  8988. tbkMCIchk
  8989. startDisc
  8990. txClassName
  8991. HSliderThumb
  8992.  defFillColor
  8993. 0,100,0
  8994. H * glide
  8995. line id 99 of page id 3
  8996. ` V width
  8997. x defStrokeColor
  8998. 0,0,0
  8999. Driver switch
  9000. 6!txclassname
  9001. vSwitchHandle
  9002. Scan Reverse
  9003. 4s_start
  9004. checkDevice TRUE
  9005.     --beginning 
  9006. millisecFromMSF(tbkMCIchk("status cdAudio 
  9007. track 1","",1,1)) + 1000
  9008. ms","",1)
  9009. ","",1)
  9010.  + 5000
  9011. " && 
  9012. - 5000,"",1)
  9013. " && 
  9014. ,"",1)
  9015. msf","",1)
  9016. Play 
  9017. ","",1,1)
  9018. uttonDown
  9019. buttonStillDown
  9020. buttonDown
  9021. buttonUp
  9022. buttonDown
  9023. checkDevice
  9024. status cdAudio position track 1
  9025. tbkMCIchk
  9026. millisecFromMSF
  9027. buttonStillDown
  9028. s_start
  9029. buttonStillDown
  9030. set cdAudio time format ms
  9031. tbkMCIchk
  9032. status cdAudio position
  9033. tbkMCIchk
  9034. seek cdAudio to
  9035. tbkMCIchk
  9036. seek cdAudio to
  9037. tbkMCIchk
  9038. set cdAudio time format msf
  9039. tbkMCIchk
  9040. s_start
  9041. buttonUp
  9042. Play cdAudio
  9043. tbkMCIchk
  9044. Skip Reverse
  9045. ZmaxTracks, 
  9046. checkDevice TRUE
  9047. tbkMCIchk("status cdAudio 
  9048. tracks","",1,1)
  9049. 0Status 
  9050. 'current 
  9051. &","",1)
  9052. w <> 
  9053. ~ > 1
  9054. tmsf","",1)
  9055. play 
  9056. " && (
  9057.  - 1) & ":00:00:00","",1)
  9058. buttonDown
  9059. buttonDown
  9060. checkDevice
  9061. status cdAudio number of tracks
  9062. tbkMCIchk
  9063. Status cdAudio current track
  9064. tbkMCIchk
  9065. set cdAudio time format tmsf
  9066. tbkMCIchk
  9067. play cdAudio from
  9068. :00:00:00
  9069. tbkMCIchk
  9070. set cdAudio time format msf
  9071. tbkMCIchk
  9072. maxTracks
  9073. Track
  9074. Pause
  9075. checkDevice TRUE
  9076. tbkMCIchk("Pause cdAudio","",1)
  9077. buttonDown
  9078. buttonDown
  9079. checkDevice
  9080. Pause cdAudio
  9081. tbkMCIchk
  9082. Skip Forward
  9083. ZmaxTracks, 
  9084. checkDevice TRUE
  9085. tbkMCIchk("status cdAudio 
  9086. tracks","",1,1)
  9087. 0Status 
  9088. 'current 
  9089. &","",1)
  9090. w <> 
  9091. tmsf","",1)
  9092. play 
  9093. " && (
  9094.  + 1) & ":00:00:00","",1)
  9095. buttonDown
  9096. buttonDown
  9097. checkDevice
  9098. status cdAudio number of tracks
  9099. tbkMCIchk
  9100. Status cdAudio current track
  9101. tbkMCIchk
  9102. set cdAudio time format tmsf
  9103. tbkMCIchk
  9104. play cdAudio from
  9105. :00:00:00
  9106. tbkMCIchk
  9107. set cdAudio time format msf
  9108. tbkMCIchk
  9109. maxTracks
  9110. Track
  9111. checkDevice TRUE
  9112. tbkMCIchk("Play cdAudio","",1,1)
  9113. buttonDown
  9114. buttonDown
  9115. checkDevice
  9116. Play cdAudio
  9117. tbkMCIchk
  9118. Scan Forward
  9119. 4s_end
  9120. checkDevice TRUE
  9121. millisecFromMSF(tbkMCIchk("status cdAudio length","",1,1))
  9122. ms","",1)
  9123. ","",1)
  9124.  - 5000
  9125. zeek 
  9126. " && 
  9127. + 5000,"",1)
  9128. " && 
  9129. ,"",1)
  9130. msf","",1)
  9131. Play 
  9132. ","",1,1)
  9133. uttonDown
  9134. buttonStillDown
  9135. buttonDown
  9136. buttonUp
  9137. buttonDown
  9138. checkDevice
  9139. status cdAudio length
  9140. tbkMCIchk
  9141. millisecFromMSF
  9142. buttonStillDown
  9143. s_end
  9144. buttonStillDown
  9145. set cdAudio time format ms
  9146. tbkMCIchk
  9147. status cdAudio position
  9148. tbkMCIchk
  9149. seek cdAudio to
  9150. tbkMCIchk
  9151. seek cdAudio to
  9152. tbkMCIchk
  9153. set cdAudio time format msf
  9154. tbkMCIchk
  9155. s_end
  9156. buttonUp
  9157. Play cdAudio
  9158. tbkMCIchk
  9159. checkDevice TRUE
  9160. tbkMCIchk("status cdAudio mode","",1,1) 
  9161. "door closed","",1)
  9162. ","",1)
  9163. buttondown
  9164. buttondown
  9165. checkDevice
  9166. status cdAudio mode
  9167. tbkMCIchk
  9168. set cdAudio door closed
  9169. tbkMCIchk
  9170. set cdAudio door open
  9171. tbkMCIchk
  9172. checkDevice TRUE
  9173. tbkMCIchk("Stop cdAudio","",1,1)
  9174. ms","",1)
  9175. 8status 
  9176. track 1","",1) + 1000
  9177. _seek 
  9178. " && 
  9179. ,"",1)
  9180. msf","",1)
  9181. buttonDown
  9182. buttonDown
  9183. checkDevice
  9184. Stop cdAudio
  9185. tbkMCIchk
  9186. set cdAudio time format ms
  9187. tbkMCIchk
  9188. status cdAudio position track 1
  9189. tbkMCIchk
  9190. seek cdAudio to
  9191. tbkMCIchk
  9192. set cdAudio time format msf
  9193. tbkMCIchk
  9194. Restart Track
  9195. Ztrack
  9196. checkDevice TRUE
  9197. tbkMCIchk("Status cdAudio current 
  9198. @","",1,1)
  9199. tmsf","",1)
  9200. Fplay 
  9201. " && 
  9202. v & ":00:00:00","",1)
  9203. buttonDown
  9204. buttonDown
  9205. checkDevice
  9206. Status cdAudio current track
  9207. tbkMCIchk
  9208. set cdAudio time format tmsf
  9209. tbkMCIchk
  9210. play cdAudio from
  9211. :00:00:00
  9212. tbkMCIchk
  9213. set cdAudio time format msf
  9214. tbkMCIchk
  9215. track
  9216. $    $    @
  9217. Play Track
  9218. Ztrack, len
  9219. checkDevice TRUE
  9220. tbkMCIchk("Status cdAudio current 
  9221. E","",1,1)
  9222. !length 
  9223. b" && 
  9224. i"",1)
  9225. MSFfromMillisec(millisecFromMSF(
  9226. ) - 14)
  9227. tmsf","",1)
  9228. play 
  9229. " && 
  9230.  & ":00:00:00 
  9231.         && 
  9232.  & ":" & 
  9233. ,"",1)
  9234. buttonDown
  9235. buttonDown
  9236. checkDevice
  9237. Status cdAudio current track
  9238. tbkMCIchk
  9239. Status cdAudio length track
  9240. tbkMCIchk
  9241. millisecFromMSF
  9242. MSFfromMillisec
  9243. set cdAudio time format tmsf
  9244. tbkMCIchk
  9245. play cdAudio from
  9246. :00:00:00 to
  9247. tbkMCIchk
  9248. set cdAudio time format msf
  9249. tbkMCIchk
  9250. track
  9251. Play From
  9252. 4s_prompt
  9253. ZtrackNumber
  9254. checkDevice TRUE
  9255. ("Play 
  9256. (Examples: ""3:45"", ""
  9257. E 4""):" 
  9258. tbkMCIchk("
  9259. cdAudio 
  9260. tmsf","",1)
  9261. %play 
  9262. " && 
  9263.  & ":00:00:00","",1,1)
  9264. " && 
  9265.  & ":00","",1,1)
  9266. buttonDown
  9267. buttonDown
  9268. checkDevice
  9269. Play from (Examples: "3:45", "track 4"):
  9270. cancel
  9271. track
  9272. set cdAudio time format tmsf
  9273. tbkMCIchk
  9274. play cdAudio from
  9275. :00:00:00
  9276. tbkMCIchk
  9277. set cdAudio time format msf
  9278. tbkMCI
  9279. set cdAudio time format msf
  9280. tbkMCIchk
  9281. play cdAudio from
  9282. tbkMCIchk
  9283. trackNumber
  9284. s_prompt
  9285. Play To
  9286. 4s_prompt
  9287. ZtrackNumber
  9288. checkDevice TRUE
  9289. ("Play 
  9290. (Examples: ""3:45"", ""
  9291. E 4""):" 
  9292. tbkMCIchk("
  9293. cdAudio 
  9294. tmsf","",1)
  9295. %play 
  9296. " && 
  9297.  & ":00:00:00","",1,1)
  9298. " && 
  9299.  & ":00","",1,1)
  9300. buttonDown
  9301. buttonDown
  9302. checkDevice
  9303. Play to (Examples: "3:45", "track 4"):
  9304. cancel
  9305. track
  9306. set cdAudio time format tmsf
  9307. tbkMCIchk
  9308. play cdAudio to
  9309. :00:00:00
  9310. tbkMCIchk
  9311. set cdAudio time format msf
  9312. tbkMCI
  9313. set cdAudio time format msf
  9314. tbkMCIchk
  9315. play cdAudio to
  9316. tbkMCIchk
  9317. trackNumber
  9318. s_prompt
  9319. Play From To
  9320. 4s_prompt
  9321. checkDevice TRUE
  9322. ("Play 
  9323. (Examples: ""3:45 
  9324. 4:17"", ""track 4 
  9325. 9""):" 
  9326. tbkMCIchk("
  9327. cdAudio 
  9328. tmsf","",1)
  9329. %play 
  9330. " && \
  9331.  & ":00:00:00 
  9332. " && \
  9333.  & ":00:00:00","",1,1)
  9334. " && \
  9335.  & ":00 
  9336. " && \
  9337.  & ":00","",1,1)
  9338. buttonDown
  9339. buttonDown
  9340. checkDevice
  9341. Play from (Examples: "3:45 to 4:17", "track 4 to 9"):
  9342. cancel
  9343. track
  9344. set cdAudio time format tmsf
  9345. tbkMCIchk
  9346. play cdAudio from
  9347. :00:00:00 to
  9348. :00:00:00
  9349. tbkMCIchk
  9350. set cdAudio time format msf
  9351. tbkMCI
  9352. set cdAudio time format msf
  9353. tbkMCIchk
  9354. play cdAudio from
  9355. :00 to
  9356. tbkMCIchk
  9357. s_prompt
  9358. Tracks
  9359. Track
  9360. Position
  9361. -- The 
  9362. used only 
  9363. you want 
  9364. -updating 
  9365. fits own timer.
  9366. -- To turn the 
  9367.  on, 
  9368. running 
  9369. "on" 
  9370. tbkTimer("
  9371. V shareable alias tmCDPos",
  9372.  type periodic","")
  9373.  1000","")
  9374. aplay 
  9375. vclose 
  9376. multimedia
  9377. ownerPgBkgnd 
  9378. tbkMCI("sysinfo cdaudio use count","")
  9379. (isNumber(
  9380. tbkCDAudio("status cdAudio 
  9381. ","")
  9382. Tn-2 
  9383. multimedia
  9384. running
  9385. running
  9386. open timer shareable alias tmCDPos
  9387. tbkTimer
  9388. set tmCDPos type periodic
  9389. tbkTimer
  9390. set tmCDPos period 1000
  9391. tbkTimer
  9392. play tmCDPos
  9393. tbkTimer
  9394. close tmCDPos
  9395. tbkTimer
  9396. multimedia
  9397. ownerPgBkgnd
  9398. running
  9399. sysinfo cdaudio use count
  9400. tbkMCI
  9401. isNumber
  9402. status cdAudio position
  9403. tbkCDAudio
  9404. Animation:  Event Editor
  9405. bitmap 
  9406. custom 
  9407. index widget
  9408. 4s_path, s_last
  9409. tbkBitmapchk("
  9410. " && 
  9411. 5 & "ix1.dib alias 
  9412.  style child", 1, 1)
  9413. 20, 120")
  9414. C state 
  9415. textScrolled
  9416. " && 
  9417.  & "ix" & 
  9418. ) & \
  9419. ix" & 
  9420. < && "
  9421. eix" & 
  9422. V && "
  9423. 20, 120")
  9424. eix" & 
  9425. y && "
  9426. e" && 
  9427.  && "
  9428. ("close" && 
  9429. "ix" & 
  9430. e" && 
  9431.  && "
  9432. ouseEnter
  9433. textScrolled
  9434. mouseEnter
  9435. mouseLeave
  9436. mouseEnter
  9437. ix1.dib alias ix1 style child
  9438. tbkBitmapchk
  9439. window ix1 position 20, 120
  9440. tbkBitmap
  9441. window ix1 state show
  9442. tbkBitmap
  9443. s_path
  9444. s_last
  9445. textScrolled
  9446. .dib alias ix
  9447. style child
  9448. tbkBitmapchk
  9449. window ix
  9450. position 20, 120
  9451. tbkBitmap
  9452. window ix
  9453. state show
  9454. tbkBitmap
  9455. window
  9456. state hide
  9457. tbkBitmap
  9458. close
  9459. tbkBitmap
  9460. s_path
  9461. s_last
  9462. mouseLeave
  9463. window
  9464. state hide
  9465. tbkBitmap
  9466. close
  9467. tbkBitmap
  9468. s_last
  9469. Wave Audio:  Sound and Animation
  9470. MIDI sequencer:  Simple Controls
  9471. Bitmap Graphics:  Bitmap Buttons
  9472. CDAudio: Controls (1)
  9473. Wave Audio:  Wave File Buttons
  9474. Wave Audio:  Event Editor
  9475. B"Unload"
  9476. --update the 
  9477. tbkMCI("status waveFile 
  9478. ","")
  9479. "Name"
  9480. "Length"
  9481. "Start Position"
  9482. "End 
  9483. yieldApp()
  9484. leavePage
  9485. leavePage
  9486. buttonDown
  9487. Unload
  9488. status waveFile position
  9489. tbkMCI
  9490. Length
  9491. Start Position
  9492. End Position
  9493. Position
  9494. Position
  9495. Position
  9496. yieldApp
  9497. noCopy
  9498. The controls on this page let you select a clip from a wave file and create a button that plays that clip.  
  9499. After loading a wave file, select a clip from it by clicking the Start and End Clip buttons while the wave file is playing.  This will set the Start and End Position fields' text to the wave file's current position.  You can also edit the text of the Start and End Position fields.  The End Position field text should be greater than the Start Position field text.  Click the Play Clip button to test your clip.    When you're done, click the Make A Wave File Button button.  A button that plays the clip will be copied to the clipboard.
  9500. The Load button  opens  the device and a file, and the Unload button 
  9501.  closes  them.  An  idle handler  updates the Position field by querying the status of the wave audio driver.  
  9502. The Wave File, Length and Position fields require this page's idle handler.  You must copy the handler into the page or background where you paste these elements if you want them to update correctly.  e correctly.  ectly.   you need to use this page's idle handler..andler...
  9503. editScript "
  9504. tbkmcichk(""
  9505. B"load"
  9506. buttonDown
  9507. buttonDown
  9508. editScript
  9509. get tbkmcichk("open
  9510. editScript "
  9511. tbkmci(""close", 
  9512. B"unload"
  9513. buttonDown
  9514. buttonDown
  9515. editScript
  9516. get tbkmci("close
  9517. unload
  9518. editscript "
  9519. buttonDown
  9520. buttonDown
  9521. editscript
  9522. to handle idle
  9523.  waveFile : an alias for the wave file.
  9524. editScript "alias wavefile", 
  9525. B"load"
  9526. buttonDown
  9527. buttonDown
  9528. editScript
  9529. alias wavefile
  9530. Wave Audio
  9531. Event Editor
  9532. Position::sition    
  9533. Restart
  9534.  rack 
  9535. Rewind  
  9536. Stop  t 
  9537. Play rt 
  9538. FF n rt 
  9539. Unload  
  9540. Position
  9541. txclassname
  9542. 3DFrame Recessed
  9543. Wave File: s: e:  
  9544. Start Position
  9545. Start Position:  n  
  9546. End Position
  9547. End Position: tion  
  9548. tbkMCI("play d:\mm\wave.
  9549. 200 wait","")
  9550. buttonUp
  9551. buttonUp
  9552. play d:\mm\wave.wav from 100 to 200 wait
  9553. tbkMCI
  9554. fileName
  9555. d:\mm\wave.wav
  9556. Button
  9557. Length
  9558. Length: onds: e:  
  9559. Play Clip
  9560. Restart Clipck 
  9561. ZfileName
  9562. a wave 
  9563. OpenDlg(".", "*.
  9564. ", "Please choose a 
  9565. D.", "Choose Wave File")
  9566.     --close old 
  9567. B"Unload"
  9568. tbkMCIchk("
  9569. " && 
  9570.  && "alias waveFile","",1,1)
  9571. ms","",1)
  9572. Tstatus 
  9573. > length","",1)
  9574. "Length" 
  9575. buttonDown
  9576. buttonDown
  9577. *.wav
  9578. Please choose a wave file.
  9579. Choose Wave File
  9580. OpenDlg
  9581. buttonDown
  9582. Unload
  9583. alias waveFile
  9584. tbkMCIchk
  9585. set waveFile time format ms
  9586. tbkMCIchk
  9587. status waveFile length
  9588. tbkMCIchk
  9589. Length
  9590. fileName
  9591. Unload
  9592. --close the wave file
  9593. tbkMCI("
  9594.  waveFile","")
  9595. buttonDown
  9596. buttonDown
  9597. close waveFile
  9598. tbkMCI
  9599. Restart
  9600. tbkMCIchk("seek waveFile 
  9601. 0","",1)
  9602. buttonDown
  9603. buttonDown
  9604. seek waveFile to 0
  9605. tbkMCIchk
  9606. Rewind
  9607. 4s_ct
  9608. Zp, i
  9609. - > 100
  9610. A > 50
  9611. tbkMCIchk("status waveFile" && "
  9612. ","",1,1)
  9613. b(0, p - i)
  9614. =eek 
  9615. " && p,"",1)
  9616. buttonDown
  9617. buttonStillDown
  9618. buttonDown
  9619. buttonStillDown
  9620. buttonStillDown
  9621. status waveFile
  9622. position
  9623. tbkMCIchk
  9624. seek waveFile to
  9625. tbkMCIchk
  9626. tbkMCIchk("stop waveFile","",1)
  9627. 0","",1)
  9628. buttonDown
  9629. buttonDown
  9630. stop waveFile
  9631. tbkMCIchk
  9632. seek waveFile to 0
  9633. tbkMCIchk
  9634. tbkMCIchk("play waveFile","",1)
  9635. yieldApp()
  9636. buttonDown
  9637. buttonDown
  9638. play waveFile
  9639. tbkMCIchk
  9640. yieldApp
  9641. 4s_ct
  9642. Zp, i
  9643. - > 100
  9644. A > 50
  9645. tbkMCIchk("status waveFile" && "
  9646. ","",1,1)
  9647. "Length", p + i)
  9648. Heek 
  9649. " && p,"",1)
  9650. buttonDown
  9651. buttonStillDown
  9652. buttonDown
  9653. buttonStillDown
  9654. buttonStillDown
  9655. status waveFile
  9656. position
  9657. tbkMCIchk
  9658. Length
  9659. seek waveFile to
  9660. tbkMCIchk
  9661. Restart Clip
  9662. "Start Position" 
  9663. "Please 
  9664. a clip 
  9665. tbkMCIchk("seek waveFile 
  9666. " && 
  9667. [,"",1)
  9668. buttonDown
  9669. buttonDown
  9670. Start Position
  9671. Please select a clip first.
  9672. seek waveFile to
  9673. Start Position
  9674. tbkMCIchk
  9675. Play Clip
  9676. "Start Position" 
  9677. "Please 
  9678. a clip 
  9679. tbkMCIchk("play waveFile 
  9680. " && 
  9681. \&& \
  9682. " && 
  9683. "End 
  9684. o,"",1)
  9685. yieldApp()
  9686. buttonDown
  9687. buttonDown
  9688. Start Position
  9689. Please select a clip first.
  9690. play waveFile from
  9691. Start Position
  9692. End Position
  9693. tbkMCIchk
  9694. yieldApp
  9695. Start Clip
  9696. tbkMCIchk("status waveFile 
  9697. ","",1,1)
  9698. "Start Position"
  9699. buttonDown
  9700. buttonDown
  9701. status waveFile position
  9702. tbkMCIchk
  9703. Start Position
  9704. Start Clip
  9705. End Clip
  9706. tbkMCIchk("status waveFile 
  9707. ","",1,1)
  9708. "End Position"
  9709. buttonDown
  9710. buttonDown
  9711. status waveFile position
  9712. tbkMCIchk
  9713. End Position
  9714. End Clip
  9715. Make A Wave Audio Clip Button
  9716. ZfileName, startPos, endPos
  9717. "Start Position" 
  9718. "Please 
  9719. a clip 
  9720. "End 
  9721. setDefaultButtonStyle
  9722. 2000,750
  9723. "Wave Clip"
  9724. }" & CRLF & TAB & \
  9725. tbkMCI(""
  9726. " && 
  9727.  && "alias clipAlias"",
  9728. )" & 
  9729. ms"",
  9730. )" & 
  9731. Uplay 
  9732. " && 
  9733.  && \
  9734. " && 
  9735.  && "wait"",
  9736. )" & 
  9737. close 
  9738. )" & 
  9739. Bthat plays" && 
  9740.  && "
  9741. " && 
  9742.  && \
  9743. " && 
  9744.  && "has been copied 
  9745. the clipboard."
  9746. buttonUp
  9747. buttonUp
  9748. Start Position
  9749. Please select a clip first.
  9750. Start Position
  9751. End Position
  9752. setDefaultButtonStyle
  9753. Wave Clip
  9754. to handle buttonUp
  9755. get tbkMCI("open
  9756. alias clipAlias","")
  9757. get tbkMCI("set clipAlias time format ms","")
  9758. get tbkMCI("play clipAlias from
  9759. wait","")
  9760. get tbkMCI("close clipAlias","")
  9761. A button that plays
  9762. has been copied to the clipboard.
  9763. fileName
  9764. startPos
  9765. endPos
  9766. Make A Wave Audio Clip Button
  9767. Wave Audio:  Sound and Animation
  9768. Wave audio files can be be played during animation sequences by using the 
  9769.  yieldApp( )  function in TBKWIN.DLL.  The 
  9770.  hold  parameter for the play command prevents a lapse in the animation when the sound file finishes playing.
  9771. This page contains simple ToolBook object and font animation.  The wheel rolls by setting the  scroll  property of a field while moving it.
  9772. The  enterBook  handler in the sysBook links the TBKWIN DLL and the yieldApp( ) function... it.
  9773. editScript "
  9774. yieldApp()", 
  9775. B"Roll The Wheel"
  9776. buttonDown
  9777. buttonDown
  9778. editScript
  9779. get yieldApp()
  9780. Roll The Wheel
  9781. editScript "hold", 
  9782. B"Roll The Wheel"
  9783. buttonDown
  9784. buttonDown
  9785. editScript
  9786. Roll The Wheel
  9787. editScript "
  9788. B"Roll The Wheel"
  9789. buttonDown
  9790. buttonDown
  9791. editScript
  9792. set scroll
  9793. Roll The Wheel
  9794. editScript "yieldApp()", tbkmmsbk()
  9795. buttonDown
  9796. buttonDown
  9797. editScript
  9798. yieldApp()
  9799. tbkmmsbk
  9800.  waveFile : an alias for the wave file.
  9801. editScript "alias wavefile", 
  9802. B"Roll The Wheel"
  9803. buttonDown
  9804. buttonDown
  9805. editScript
  9806. alias wavefile
  9807. Roll The Wheel
  9808. Wave Audio
  9809. Synchronizing Sound and Animation
  9810. wheel
  9811. Roll the Wheel
  9812. 4s_path
  9813. Zi, j
  9814. tbkMCIchk("
  9815. " && 
  9816. * & "train.wav alias waveFile","",1,1)
  9817. :play 
  9818. 0 hold",
  9819.     --use yield here 
  9820. let the sound 
  9821. playing
  9822. yieldApp()
  9823. "wheel" 
  9824. H45,0
  9825.             --
  9826. avoid gaps 
  9827. splays
  9828. H-3600,0
  9829. tbkmmnotify
  9830. tbkmci("close 
  9831. buttonDown
  9832. tbkmmnotify
  9833. buttonDown
  9834. train.wav alias waveFile
  9835. tbkMCIchk
  9836. play waveFile from 0 hold
  9837. tbkMCIchk
  9838. yieldApp
  9839. wheel
  9840. wheel
  9841. yieldApp
  9842. wheel
  9843. j:to1
  9844. s_path
  9845. tbkmmnotify
  9846. close waveFile
  9847. tbkmci
  9848. fileName
  9849. D:\MM\WIDGET\bells.wav
  9850. Roll the Wheel
  9851. %&[a:
  9852. "Driver Switch" 
  9853. asure the CD Device 
  9854. turned on
  9855. checkDevice trueOrFalse
  9856. --update 
  9857. `Position, Track 
  9858. Tracks 
  9859. 4s_device, s_idle
  9860.     --bypass status queries 
  9861. - isn't 
  9862. xtbkMCI("
  9863. -cdAudio media present","")
  9864. sliderPosition 
  9865. "Slider" 
  9866. ","")
  9867. E" <> 
  9868. ms","")
  9869. ","")
  9870. SliderPosition 
  9871. length","")
  9872. msf","")
  9873.     -- wait 
  9874. messages 
  9875. 4updating following stuff
  9876. tracks
  9877. ","")
  9878. current 
  9879. b","")
  9880. avePage
  9881. checkDevice
  9882. leavePage
  9883. leavePage
  9884. Driver Switch
  9885. checkDevice
  9886. Driver Switch
  9887. Driver Switch
  9888. trueOrFalse
  9889. status cdAudio media present
  9890. tbkMCI
  9891. Position
  9892. Position
  9893. Track
  9894. Tracks
  9895. Slider
  9896. sliderPosition
  9897. status cdAudio position
  9898. tbkMCI
  9899. Position
  9900. Position
  9901. set cdAudio time format ms
  9902. tbkMCI
  9903. status cdAudio position
  9904. tbkMCI
  9905. Slider
  9906. SliderPosition
  9907. status cdAudio length
  9908. tbkMCI
  9909. set cdAudio time format msf
  9910. tbkMCI
  9911. status cdAudio number of tracks
  9912. tbkMCI
  9913. Tracks
  9914. Tracks
  9915. status cdAudio current track
  9916. tbkMCI
  9917. Track
  9918. Track
  9919. s_device
  9920. s_idle
  9921. MIDI sequencer:  Status
  9922. CD Audio:  Status
  9923. es & Status
  9924. "capabilityResults"
  9925. "statusResults"
  9926. leavePage
  9927. leavePage
  9928. capabilityResults
  9929. statusResults
  9930. The Update buttons scripts walk through the  textlines  of the Capability and Status fields and queries the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status Results fields.e driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status Results fields.
  9931. The Update buttons scripts walk through the  textlines  of the Capability and Status fields and queries the driver for the term on each textline.  The query results are stored in a variable and then displayed in the Capability and Status Results fields.
  9932. The  Capability  button queries the wave audio device; the  Status  button queries a wave audio file.
  9933. editScript "
  9934. B"update capability"
  9935. buttonDown
  9936. buttonDown
  9937. editScript
  9938. step i from 1 to textLineCount(it)
  9939. update capability
  9940. CD Audio
  9941. Capability and Statusus
  9942. txclassname
  9943. 3DFrame Recessed
  9944. status
  9945. Ready
  9946. Media Present
  9947. Length
  9948. Position
  9949. Number of tracks
  9950. Current trackitsPerSample
  9951. SamplesPerSec
  9952. Number of tracks
  9953. Current trackrent track
  9954. statusResults
  9955. txclassname
  9956. 3DFrame Recessed
  9957. Capability
  9958. Capability
  9959. Capability
  9960. Can record
  9961. Device type
  9962. Has audio
  9963. Has video
  9964. Compound device
  9965. capabilityResults
  9966. Status
  9967. Status
  9968. Update capability
  9969. Zcapability
  9970. "capabilityResults"
  9971. tbkMCIchk("
  9972. cdAudio shareable","",1,1)
  9973. y cdaudio" && 
  9974. ,"") & \
  9975.             CRLF 
  9976. y("close 
  9977. 6,"")
  9978. buttonDown
  9979. buttonDown
  9980. capabilityResults
  9981. open cdAudio shareable
  9982. tbkMCIchk
  9983. capability
  9984. capability cdaudio
  9985. tbkMCI
  9986. close cdaudio
  9987. tbkMCI
  9988. capabilityResults
  9989. capability
  9990. Update Capability
  9991. Update Status
  9992. Zstatus
  9993. tbkMCI("
  9994. cdAudio shareable","")
  9995. 7" && 
  9996. ,"") & \
  9997.             CRLF 
  9998. kclose 
  9999. i","")
  10000. statusResults
  10001. buttonDown
  10002. buttonDown
  10003. open cdAudio shareable
  10004. tbkMCI
  10005. status
  10006. status cdAudio
  10007. tbkMCI
  10008. close cdAudio
  10009. tbkMCI
  10010. statusResults
  10011. status
  10012. Update Status
  10013. CD Audio:  Status
  10014. Generic:  Vertical Sliders
  10015.   Status
  10016. Generic:  Audio Mixer
  10017. o controls
  10018.  .#F&
  10019. These sliders do not control device drivers currently supported by MCI.  When the audio mixer interface is defined for MCI, these controls can be adapted to control the mixer.  You will have to adapt their scripts to suit the needs of your configuration.
  10020. The Sound checkbox can be used to turn the sound on or off. 
  10021. Controls on this page are not hooked up to anything.  However, the sliders have a small script that makes them control each other.  Use this script as an example to see how you can set slider positions or control other items with sliders.
  10022.  s_Sound : a system variable containing TRUE or FALSE set in the Sound checkbox.  t
  10023. editScript "
  10024. s_Sound", 
  10025. B"soundCheckbox"
  10026. buttonUp
  10027. buttonUp
  10028. editScript
  10029. set s_Sound
  10030. soundCheckbox
  10031. Generic Controls
  10032. Audio Mixer Mixer
  10033. Master
  10034. Sound
  10035. soundCheckbox
  10036. 4s_Sound
  10037. buttonUp
  10038. buttonUp
  10039. s_Sound
  10040. Sound
  10041. Volume Control
  10042. tbkMCI("Set audio1 level" && 
  10043. (256 * 
  10044. os), "")
  10045. (256 * 
  10046. os), "")
  10047. StillDown
  10048. buttonStillDown
  10049. buttonUp
  10050. buttonStillDown
  10051. Set audio1 level
  10052. tbkMCI
  10053. buttonUp
  10054. Set audio1 level
  10055. tbkMCI
  10056. 0.6936647955092221
  10057. txClassName
  10058. Slider
  10059. height
  10060. defStrokeColor
  10061. 0,0,0
  10062. width
  10063. glide
  10064. button id 28 of page id 4
  10065. defFillColor
  10066. 0,100,0
  10067. txClassName
  10068. vSliderThumb
  10069. txclassname
  10070. 3DFrame Recessed
  10071. handl 
  10072. -(y1, 
  10073. buttonUp
  10074. buttonUp
  10075. handl
  10076. txclassname
  10077. vSwitchHandle
  10078. handl 
  10079. -(y1, 
  10080. 0,50.1875,0
  10081. buttonUp
  10082. buttonUp
  10083. 0,50,100
  10084. handl
  10085. txclassname
  10086. vSwitchHandle
  10087. CD Driver switch
  10088. handl 
  10089. -(y1, 
  10090. 0,50.1875,0
  10091. buttonUp
  10092. buttonUp
  10093. 120,50,100
  10094. handl
  10095. txclassname
  10096. vSwitchHandle
  10097. handl 
  10098. -(y1, 
  10099. buttonUp
  10100. buttonUp
  10101. 0,50,100
  10102. 0,0,0
  10103. handl
  10104. txclassname
  10105. vSwitchHandle
  10106. handl 
  10107. -(y1, 
  10108. buttonUp
  10109. buttonUp
  10110. 120,50,100
  10111. 0,0,0
  10112. handl
  10113. txclassname
  10114. vSwitchHandle
  10115. Player
  10116. Volume Control
  10117. tbkMCI("Set audioMaster level" && 
  10118. (256 * 
  10119. os), "")
  10120. (256 * 
  10121. os), "")
  10122. StillDown
  10123. buttonStillDown
  10124. buttonUp
  10125. buttonStillDown
  10126. Set audioMaster level
  10127. tbkMCI
  10128. buttonUp
  10129. Set audioMaster level
  10130. tbkMCI
  10131. txClassName
  10132. Slider
  10133. 0.7417802726543705
  10134. txClassName
  10135. vSliderThumb
  10136. defFillColor
  10137. 0,100,0
  10138. glide
  10139. button id 28 of page id 4
  10140. width
  10141. defStrokeColor
  10142. 0,0,0
  10143.  height
  10144. Volume Control
  10145. tbkMCI("Set audio3 level" && 
  10146. (256 * 
  10147. os), "")
  10148. (256 * 
  10149. os), "")
  10150. StillDown
  10151. buttonStillDown
  10152. buttonUp
  10153. buttonStillDown
  10154. Set audio3 level
  10155. tbkMCI
  10156. buttonUp
  10157. Set audio3 level
  10158. tbkMCI
  10159. !txClassName
  10160. Slider
  10161. 0.5132317562149158
  10162. "r"txClassName
  10163. vSliderThumb
  10164. "defFillColor
  10165. 0,100,0
  10166. "glide
  10167. button id 28 of page id 4
  10168. "width
  10169. #defStrokeColor
  10170. 0,0,0
  10171. $#height
  10172. Volume Control
  10173. tbkMCI("Set audio2 level" && 
  10174. (256 * 
  10175. os), "")
  10176. (256 * 
  10177. os), "")
  10178. StillDown
  10179. buttonStillDown
  10180. buttonUp
  10181. buttonStillDown
  10182. Set audio2 level
  10183. tbkMCI
  10184. buttonUp
  10185. Set audio2 level
  10186. tbkMCI
  10187. $txClassName
  10188. Slider
  10189. 0.5493183640737771
  10190. %txClassName
  10191. vSliderThumb
  10192. %defFillColor
  10193. 0,100,0
  10194. %glide
  10195. button id 28 of page id 4
  10196. %width
  10197. &defStrokeColor
  10198. 0,0,0
  10199. 8&height
  10200. 4s_kHz, s_Channels
  10201. FALSE
  10202. B"11025" 
  10203. 11025
  10204. "stereoMono" 
  10205. B"1" 
  10206. "Driver Switch" 
  10207. asure the CD Device 
  10208. turned on
  10209. checkDevice trueOrFalse
  10210. --update 
  10211. `Position, Track 
  10212. Tracks 
  10213. 4s_device, s_idle
  10214.     --bypass status queries 
  10215. - isn't 
  10216. xtbkMCI("
  10217. -cdAudio media present","")
  10218. "Start 
  10219. "End 
  10220. ","")
  10221. " <> 
  10222.     -- wait 
  10223. messages 
  10224. 4updating following stuff
  10225. tracks
  10226. ","")
  10227. current 
  10228. b","")
  10229. leavePage
  10230. enterpage
  10231. checkDevice
  10232. enterpage
  10233. 11025
  10234. stereoMono
  10235. s_kHz
  10236. s_Channels
  10237. leavePage
  10238. Driver Switch
  10239. checkDevice
  10240. Driver Switch
  10241. Driver Switch
  10242. trueOrFalse
  10243. status cdAudio media present
  10244. tbkMCI
  10245. Position
  10246. Position
  10247. Track
  10248. Tracks
  10249. Start Position
  10250. End Position
  10251. status cdAudio position
  10252. tbkMCI
  10253. Position
  10254. Position
  10255. status cdAudio number of tracks
  10256. tbkMCI
  10257. Tracks
  10258. Tracks
  10259. status cdAudio current track
  10260. tbkMCI
  10261. Track
  10262. Track
  10263. s_device
  10264. s_idle
  10265. M\D|D|u
  10266. System
  10267. M\D|D|u
  10268. aboutdlginit
  10269. M\D|D|-
  10270. bookMarks
  10271. Wave Audio:  Wave File Buttons,Map
  10272. u\zp 
  10273. KWidgets
  10274. gD|D|}
  10275. C:\TOOLBOOK\tbkmm.sbk
  10276. system
  10277. G\D|D|
  10278. System
  10279. TBKWidgets
  10280. gD|D|}
  10281. \D|D|
  10282. pageList
  10283. \D|D|
  10284. TBKWidgets
  10285. \D|D|
  10286. TBKWidgets
  10287. \D|D|
  10288. TBKWidgets
  10289. TBKWidgets
  10290. system
  10291. gD|D|}
  10292. gD|D|}
  10293. KWidgets
  10294. \D|D|
  10295. gD|D|}
  10296. TBKWidgets
  10297. gD|D|}
  10298. TBKWidgets
  10299. sysBookPath
  10300. D:\MM\tbkmm.sbk
  10301. aaaaaaaaaa
  10302. tbkmm.sbk
  10303. Multimedia Widgets
  10304. Wave Audio:  Simple Controls,Map
  10305. s Widget Book
  10306. Wave Audio:  Wave File Buttons,Map
  10307. dget Book
  10308. poration.  All Rights Reserved
  10309. Shabbir Dahod
  10310. Michelle DeWilliam
  10311. Jim Gallant
  10312. Mike Miller
  10313. Claude Ostyn
  10314. Craig Schwandt
  10315. ,b14,TRUE
  10316. aboutdlgbox
  10317. get Font - Quick Reference
  10318. Using the Widget font in apps
  10319. Optimizing Slider Performance
  10320. Use this page for your own notes
  10321. KWidgets
  10322. \D|D|
  10323. ,h11,
  10324. ,s12,Multimedia Widgets
  10325. ,s13,Copyright 1991 Asymetrix Corporation.  All rights reserved.
  10326. ,b14,TRUE
  10327. 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
  10328. rol Panels
  10329. Videodisc: Controls
  10330. Videodisc: Status
  10331. WaveAudio: Controls
  10332. WaveAudio: Events
  10333. WaveAudio: Recording Controls
  10334. WaveAudio: Status
  10335. About this Widget Book
  10336. Setting up MMWidget.tbk
  10337. Widget Font - Quick Reference
  10338. Using the Widget font in apps
  10339. Optimizing Slider Performance
  10340. Use this page for your own notes
  10341. 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
  10342. Corporation.  All Rights Reserved
  10343. Shabbir Dahod
  10344. Michelle DeWilliam
  10345. Jim Gallant
  10346. Mike Miller
  10347. Claude Ostyn
  10348. Craig Schwandt,0,,39.05,121.31,50.86,14.32,14,1342242817,128,OK,0
  10349. ,h11,
  10350. ,s12,Multimedia Widgets
  10351. ,s13,Copyright 1991 Asymetrix
  10352. Corporation.  All Rights Reserved.
  10353. Shabbir Dahod
  10354. Michelle DeWilliam
  10355. Jim Gallant
  10356. Mike Miller
  10357. Claude Ostyn
  10358. Craig Schwandt
  10359. ,b14,TRUE
  10360. Timers:  Simple Timing Controls
  10361. 4s_timerID
  10362. B"Stop Periodic Timer"
  10363. leavePage
  10364. leavePage
  10365. buttonDown
  10366. Stop Periodic Timer
  10367. s_timerID
  10368. These buttons show simple examples of how to use the timer functions in TBKMM.DLL.
  10369. Timers seem to be limited to a maximum delay of 64k milliseconds (64 seconds).  When you click the Set a Single Timer button, you're prompted for a delay, and the  buttonDown  script simply sets the cursor to an hourglass cursor during that delay period.
  10370. The Set A Periodic Timer button sets a delay of  500 milliseconds, and changes the button's caption in its 
  10371.  tbkmmTimer  handler.  Click the Stop Periodic Timer button to  stop  the periodic timer.
  10372. The call to start the periodic timer returns the  timer ID number  which is stored in a system variable so it can be used later in the Stop Periodic Timer button..
  10373. editScript "
  10374. tbkTimerStart(""single"", 
  10375. B"Set A Single 
  10376. buttonDown
  10377. buttonDown
  10378. editScript
  10379. get tbkTimerStart("single", it
  10380. Set A Single Timer
  10381. editScript "
  10382. tbkmmTimer", 
  10383. B"Set A Periodic 
  10384. buttonDown
  10385. buttonDown
  10386. editScript
  10387. to handle tbkmmTimer
  10388. Set A Periodic Timer
  10389. editScript "
  10390. tbkTimerStop(s_timerID)", 
  10391.  Periodic 
  10392. buttonDown
  10393. buttonDown
  10394. editScript
  10395. get tbkTimerStop(s_timerID)
  10396. Stop Periodic Timer
  10397. editScript "
  10398. s_timerID 
  10399. tbkTimerStart(""periodic", 
  10400. B"Set A Periodic 
  10401. buttonDown
  10402. buttonDown
  10403. editScript
  10404. set s_timerID to tbkTimerStart("periodic
  10405. Set A Periodic Timer
  10406.  s_timerID :  a system variable containing the timer id number used in the Periodic Timer buttons.
  10407. editScript "
  10408. s_timerID 
  10409. tbkTimerStart(""periodic", 
  10410. buttonDown
  10411. buttonDown
  10412. editScript
  10413. set s_timerID to tbkTimerStart("periodic
  10414. set a periodic timer
  10415. Timers
  10416. Simple Timing Controls
  10417. Set a Single Timer
  10418. ("Enter a single delay less than 
  10419. equal 
  10420. " && \
  10421. tbkTimerCapability() && "
  10422. timer."
  10423. syserrorNumber 
  10424. FALSE
  10425. tbkTimerStart("
  10426. , 1, 
  10427. sysErrorNumber = 0
  10428. tbkmmTimer
  10429. "All done."
  10430. buttonDown
  10431. tbkmmTimer
  10432. buttonDown
  10433. Enter a single delay less than or equal to 
  10434. tbkTimerCapability
  10435. for this timer.
  10436. cancel
  10437. single
  10438. tbkTimerStart
  10439. tbkmmTimer
  10440. All done.
  10441. Set a Single Timer
  10442. Set a Periodic Timer
  10443. 4s_timerID
  10444. tbkTimerStart("periodic", 500, 1, 
  10445. tbkmmTimer 
  10446. buttonDown
  10447. tbkmmTimer
  10448. buttonDown
  10449. periodic
  10450. tbkTimerStart
  10451. s_timerID
  10452. tbkmmTimer
  10453. .................
  10454. timerID
  10455. Set a Periodic Timer
  10456. Stop Periodic Timer
  10457. 4s_timerID
  10458. tbkTimerStop(
  10459. B"Set A Periodic 
  10460. buttonDown
  10461. buttonDown
  10462. tbkTimerStop
  10463. Set A Periodic Timer
  10464. Set A Periodic Timer
  10465. s_timerID
  10466. Stop Periodic Timer
  10467. setScroll 
  10468. "Description"
  10469. "Dependencies"
  10470. noCopy 
  10471. excludeTab 
  10472. Object" 
  10473. ;All" 
  10474. FALSE
  10475. rf > 0 
  10476. rf = 0 
  10477. enterPage
  10478. setScroll
  10479. enterPage
  10480. setScroll
  10481. Description
  10482. setScroll
  10483. Dependencies
  10484. noCopy
  10485. Copy Object
  10486. Copy All
  10487. Copy Object
  10488. Copy All
  10489. setScroll
  10490. scrolling
  10491. scrolling
  10492. Page Title
  10493. Description
  10494. Dependencies
  10495. Script Notes:
  10496. copyInstructions
  10497. Click an object to copy it to the clipboard.
  10498. buttonUp
  10499. buttonUp
  10500. defStroke
  10501. 0,0,0
  10502. txClassName
  10503. button
  10504. Previous
  10505. buttonUp
  10506. buttonUp
  10507.     defStroke
  10508. 0,0,0
  10509.     txClassName
  10510. button
  10511. buttonUp
  10512. buttonUp
  10513. defStroke
  10514. 0,0,0
  10515. txClassName
  10516. button
  10517. buttonUp
  10518. buttonUp
  10519. txClassName
  10520. button
  10521. defStroke
  10522. 0,0,0
  10523. Index
  10524. index
  10525. buttonUp
  10526. buttonUp
  10527. index
  10528. CLASSname
  10529. txButton
  10530. txClassName
  10531. button
  10532. Widgets
  10533. buttonUp
  10534. buttonUp
  10535. defStroke
  10536. 0,0,0
  10537. txClassName
  10538. button
  10539. Widgets
  10540. /"reference"
  10541. buttonUp
  10542. buttonUp
  10543. reference
  10544. txClassName
  10545. button
  10546. defStroke
  10547. 0,0,0
  10548. Reference
  10549. Search
  10550. buttonUp
  10551. buttonUp
  10552. search
  10553. txClassName
  10554. button
  10555. defStroke
  10556. 0,0,0
  10557. Search...
  10558. Copy Object
  10559. "copyInstructions" 
  10560. Zobj, pos
  10561. eatclicks()
  10562. objectFromPoint(
  10563. buttonDown
  10564. buttonUp
  10565. buttonDown
  10566. copyInstructions
  10567. buttonUp
  10568. eatclicks
  10569. eatclicks
  10570. copyInstructions
  10571. of background
  10572. hotword
  10573. recordfield
  10574. Copy Object
  10575. Copy All
  10576. buttonUp
  10577. buttonUp
  10578. selectAll
  10579. Copy All
  10580. widgets
  10581. setScroll 
  10582. "Description"
  10583. "Dependencies"
  10584. noCopy 
  10585. excludeTab 
  10586. Object" 
  10587. ;All" 
  10588. FALSE
  10589. rf > 0 
  10590. rf = 0 
  10591. enterPage
  10592. setScroll
  10593. enterPage
  10594. setScroll
  10595. Description
  10596. setScroll
  10597. Dependencies
  10598. noCopy
  10599. Copy Object
  10600. Copy All
  10601. Copy Object
  10602. Copy All
  10603. setScroll
  10604. scrolling
  10605. scrolling
  10606. Script Notes:
  10607. Page Title
  10608. Description
  10609. Dependencies
  10610. Copy All
  10611. buttonUp
  10612. buttonUp
  10613. selectAll
  10614. Copy All
  10615. Copy Object
  10616. "copyInstructions" 
  10617. Zobj, pos
  10618. eatclicks()
  10619. objectFromPoint(
  10620. buttonDown
  10621. buttonUp
  10622. buttonDown
  10623. copyInstructions
  10624. buttonUp
  10625. eatclicks
  10626. eatclicks
  10627. copyInstructions
  10628. of background
  10629. hotword
  10630. recordfield
  10631. Copy Object
  10632. copyInstructions
  10633. Click an object to copy it to the clipboard.
  10634. buttonUp
  10635. buttonUp
  10636. txClassName
  10637. button
  10638. defStroke
  10639. 0,0,0
  10640. Previous
  10641. buttonUp
  10642. buttonUp
  10643. txClassName
  10644. button
  10645. defStroke
  10646. 0,0,0
  10647. buttonUp
  10648. buttonUp
  10649. txClassName
  10650. button
  10651. defStroke
  10652. 0,0,0
  10653. buttonUp
  10654. buttonUp
  10655. defStroke
  10656. 0,0,0
  10657. txClassName
  10658. button
  10659. Index
  10660. index
  10661. buttonUp
  10662. buttonUp
  10663. index
  10664. txClassName
  10665. button
  10666. CLASSname
  10667. txButton
  10668. Widgets
  10669. buttonUp
  10670. buttonUp
  10671. txClassName
  10672. button
  10673. defStroke
  10674. 0,0,0
  10675. Widgets
  10676. /"reference"
  10677. buttonUp
  10678. buttonUp
  10679. reference
  10680. defStroke
  10681. 0,0,0
  10682. txClassName
  10683. button
  10684. Reference
  10685. Search
  10686. buttonUp
  10687. buttonUp
  10688. search
  10689. defStroke
  10690. 0,0,0
  10691. txClassName
  10692. button
  10693. Search...
  10694. widgets
  10695. reference
  10696. Page Title
  10697. descr1
  10698. descr2
  10699. descr3
  10700. explain
  10701. buttonUp
  10702. buttonUp
  10703. defStroke
  10704. 0,0,0
  10705. txClassName
  10706. button
  10707. Previous
  10708. buttonUp
  10709. buttonUp
  10710. defStroke
  10711. 0,0,0
  10712. txClassName
  10713. button
  10714. buttonUp
  10715. buttonUp
  10716. defStroke
  10717. 0,0,0
  10718. txClassName
  10719. button
  10720. buttonUp
  10721. buttonUp
  10722. txClassName
  10723. button
  10724. defStroke
  10725. 0,0,0
  10726. Index
  10727. index
  10728. buttonUp
  10729. buttonUp
  10730. index
  10731. CLASSname
  10732. txButton
  10733.     txClassName
  10734. button
  10735. Widgets
  10736. buttonUp
  10737. buttonUp
  10738.     defStroke
  10739. 0,0,0
  10740. txClassName
  10741. button
  10742. Widgets
  10743. buttonUp
  10744. buttonUp
  10745. txClassName
  10746. button
  10747. defStroke
  10748. 0,0,0
  10749. Reference
  10750. Search
  10751. buttonUp
  10752. buttonUp
  10753. search
  10754. txClassName
  10755. button
  10756. defStroke
  10757. 0,0,0
  10758. Search...
  10759. reference
  10760. 4s_device
  10761. Zswitch, x
  10762. -(y1, 
  10763. "off"
  10764. tbkMCI("stop cdAudio wait","")
  10765. --use 
  10766. asure 
  10767. worked
  10768. :close 
  10769. 5","")
  10770. 0,50.1875,0
  10771. tbkMCIchk("
  10772. shareable","",1,1)
  10773. ms","",1)
  10774. audio 
  10775. on","")
  10776.         --beginning 
  10777. atus 
  10778. track 1","")
  10779. H1000
  10780. " && 
  10781. msf","",1)
  10782. buttonUp
  10783. buttonUp
  10784. false
  10785. stop cdAudio wait
  10786. tbkMCI
  10787. close cdAudio
  10788. tbkMCI
  10789. open cdAudio shareable
  10790. tbkMCIchk
  10791. set cdAudio time format ms
  10792. tbkMCIchk
  10793. set cdAudio audio all on
  10794. tbkMCI
  10795. status cdAudio position track 1
  10796. tbkMCI
  10797. seek cdAudio to
  10798. tbkMCI
  10799. set cdAudio time format msf
  10800. tbkMCIchk
  10801. cdAudio
  10802. 120,50,100
  10803. switch
  10804. s_device
  10805. Generic:  Dog Sliders
  10806. 4s_Path
  10807. tbkMCI("
  10808. " && 
  10809.  & "bobark.wav alias 
  10810. ","")
  10811. " && 
  10812. C & "oodibark.
  10813. ","")
  10814. just displays the slider 
  10815. thumbe 
  10816. being moved
  10817. message so 
  10818. NysBook gets 
  10819. txClassName 
  10820. sliderPosition 
  10821. %"0,00"
  10822. "sposition"
  10823. "sPosition"
  10824. close 
  10825. ","")
  10826. ","")
  10827. buttonstilldown
  10828. enterPage
  10829. buttonup
  10830. leavePage
  10831. enterPage
  10832. bobark.wav alias bobark
  10833. tbkMCI
  10834. oodibark.wav alias oodibark
  10835. tbkMCI
  10836. s_Path
  10837. buttonstilldown
  10838. txClassName
  10839. thumb
  10840. sliderPosition
  10841. sposition
  10842. buttonup
  10843. sPosition
  10844. leavePage
  10845. sPosition
  10846. close bobark
  10847. tbkMCI
  10848. close oodibark
  10849. tbkMCI
  10850. These sliders use imported DIBs as their thumb objects.  Both of these DIBs share the same palette and use gray to fill in around the outlines of the dogs' heads.
  10851. The TBKMM.SBK sysBook slider script is activated by the txClassName user property of the thumb object.  This property can be  "vSliderThumb"  or 
  10852.  "hSliderThumb" , depending on the orientation of the slider.  The script for this page intercepts  buttonStillDown  and 
  10853.  buttonUp  messages to display the slider position.
  10854. editScript "vsliderthumb", tbkmmsbk()
  10855. buttonUp
  10856. buttonUp
  10857. editScript
  10858. vsliderthumb
  10859. tbkmmsbk
  10860. editScript "hsliderthumb", tbkmmsbk()
  10861. buttonUp
  10862. buttonUp
  10863. editScript
  10864. hsliderthumb
  10865. tbkmmsbk
  10866. editScript "
  10867. buttonUp
  10868. buttonUp
  10869. editScript
  10870. to handle buttonStillDown
  10871. editScript "
  10872. buttonUp
  10873. buttonUp
  10874. editScript
  10875. to handle buttonUp
  10876.  txClassName :  a user property of the thumb objects containing either "hSliderThumb" or "vSliderThumb"
  10877. editScript "
  10878. txClassName 
  10879. >", tbkmmsbk()
  10880. buttonUp
  10881. buttonUp
  10882. editScript
  10883. get txClassName of target
  10884. tbkmmsbk
  10885. Generic Controls
  10886. Dog Sliders
  10887. 9.401709401709402e-002
  10888. txClassName
  10889. Slider
  10890. tbkMCI("play oodibark 
  10891. 0","")
  10892. yieldApp()
  10893. buttonDown
  10894. buttonDown
  10895. play oodibark from 0
  10896. tbkMCI
  10897. yieldApp
  10898. txClassName
  10899. hsliderthumb
  10900. :PHYSSIZE
  10901. Slider Position:
  10902. sliderPosition
  10903. 0.7192982456140351
  10904. txClassName
  10905. Slider
  10906. tbkMCI("play bobark 
  10907. 0","")
  10908. yieldApp()
  10909. buttonDown
  10910. buttonDown
  10911. play bobark from 0
  10912. tbkMCI
  10913. yieldApp
  10914. txclassname
  10915. vsliderthumb
  10916. :PHYSSIZE
  10917. sPosition
  10918. "Driver Switch" 
  10919. asure the CD Device 
  10920. turned on
  10921. checkDevice trueOrFalse
  10922. --update 
  10923. `Position, Track 
  10924. Tracks 
  10925. 4s_device, s_idle
  10926.     --bypass status queries 
  10927. - isn't 
  10928. xtbkMCI("
  10929. -cdAudio media present","")
  10930. "Start 
  10931. "End 
  10932. ","")
  10933. " <> 
  10934.     -- wait 
  10935. messages 
  10936. 4updating following stuff
  10937. tracks
  10938. ","")
  10939. current 
  10940. b","")
  10941. avePage
  10942. checkDevice
  10943. leavePage
  10944. leavePage
  10945. Driver Switch
  10946. checkDevice
  10947. Driver Switch
  10948. Driver Switch
  10949. trueOrFalse
  10950. status cdAudio media present
  10951. tbkMCI
  10952. Position
  10953. Position
  10954. Track
  10955. Tracks
  10956. Start Position
  10957. End Position
  10958. status cdAudio position
  10959. tbkMCI
  10960. Position
  10961. Position
  10962. status cdAudio number of tracks
  10963. tbkMCI
  10964. Tracks
  10965. Tracks
  10966. status cdAudio current track
  10967. tbkMCI
  10968. Track
  10969. Track
  10970. s_device
  10971. s_idle
  10972. ZfileName, startPos, endPos, style
  10973. "Start Position" 
  10974. "Please 
  10975. a clip 
  10976. "What should the 
  10977. Z be?" 
  10978. f"Popup" 
  10979. "Child" 
  10980. "Overlapped"
  10981. "End 
  10982. setDefaultButtonStyle
  10983. 2500,750
  10984. "Animation File Clip"
  10985. }" & CRLF & TAB & \
  10986. tbkMCI(""
  10987. " && 
  10988.  && "
  10989. "" && 
  10990. && ""
  10991. " && \
  10992.  && "alias clipAlias"",
  10993. )" & 
  10994. frames"",
  10995. )" & 
  10996. |play 
  10997. " && 
  10998.  && \
  10999. " && 
  11000.  && "wait"",
  11001. )" & 
  11002. close 
  11003. )" & 
  11004. Bthat plays" && 
  11005.  && "
  11006. " && 
  11007.  && \
  11008. " && 
  11009.  && "has been copied 
  11010. clipboard."
  11011. buttonUp
  11012. buttonUp
  11013. Start Position
  11014. Please select a clip first.
  11015. What should the window style be?
  11016. Popup
  11017. Child
  11018. Overlapped
  11019. Start Position
  11020. End Position
  11021. setDefaultButtonStyle
  11022. Animation File Clip
  11023. to handle buttonUp
  11024. get tbkMCI("open
  11025. parent" && sysWindowHandle && "style
  11026. alias clipAlias","")
  11027. get tbkMCI("set clipAlias time format frames","")
  11028. get tbkMCI("play clipAlias from
  11029. wait","")
  11030. get tbkMCI("close clipAlias","")
  11031. A button that plays
  11032. has been copied to the clipboard.
  11033. fileName
  11034. startPos
  11035. endPos
  11036. style
  11037. Cover Page
  11038. "map"
  11039. About This Widget Book
  11040. Multimedia Widgets
  11041. Multimedia Widgets
  11042. Smart Clipart for ToolBook Authors
  11043. Smart Clipart for ToolBook Authors
  11044. Cover Page
  11045. Animation:  Status
  11046. Using the Widget font
  11047. Timers:  Capability
  11048. oojooyyoov
  11049. \\cjo{x
  11050. o^ov|
  11051. )*26Oa\J\O
  11052. \J?Jcjvuy{
  11053. vy{{yyvovt
  11054. 33826OJJAE
  11055. EJ??cjvuvy
  11056. vvuuvuoy{z
  11057. yvvoxv{|}    
  11058. EJaEJ292EJ
  11059. EZE?EjjuoV
  11060. ^y{vukqy{{
  11061. yu{oo
  11062. EEOEE8++?E
  11063. E\ZEEjujjZ
  11064. cjjcZG?E^q
  11065. uqkjv
  11066. EE22J\E88?
  11067. EjjoojooZZ
  11068. ejjO-)
  11069. uukkcev{|{
  11070. -2--88E9\g
  11071. Z\\v{{yo\J
  11072. -OvkecZck
  11073. kcck{
  11074. +-++-88?Ej
  11075. oujv{{vOJT
  11076. gcO9)
  11077. oukf`T\vz
  11078. zxuxupkJcj
  11079. 26E298858E
  11080. Eauv{{vuqk
  11081. xujJEjuvv
  11082. +)+9EZajoy
  11083. |x{vq\JMff
  11084. -cemme
  11085. {vcZcoukj
  11086. -))+-E\juu
  11087. {|{vujJRR`
  11088. #)388
  11089. cemmg
  11090. kT`x|}|xjc
  11091. juojj\
  11092. EE22+)#+5E
  11093. \uv{{}zxkZ
  11094. MHT[muj
  11095. tml]cRTu|}
  11096. okcc\c
  11097. E6E-+#)+?G
  11098. \av{|z{{xc
  11099. JKHTWin\0(
  11100. *uumee
  11101. ]JNex{
  11102. {{ojcc\O
  11103. -))*5E\jov
  11104. u`MHCKT[kJ
  11105. !,uxm`i[JH
  11106. cxz}}
  11107. OEE+*.5?cj
  11108. uv|}}zupkT
  11109. KHHCKTmfc\
  11110. G.**#),
  11111. sli`WJNT[q
  11112. {ojEE
  11113. EE223*+?
  11114. Ejov{|}|zu
  11115. keJHKC:KSm
  11116. mJ\ZE0,.??
  11117. GZRmmbWWKH
  11118. {jaZA?AJJ
  11119. 22-)*)8\
  11120. xu`TIQKH:S
  11121. We]/%9AAEJ
  11122. ZJJCfmhYX=
  11123. 5=Z`x|~
  11124. zujE??989
  11125. cjovv
  11126. zwueKS``K:
  11127. %fdWWN
  11128. DDQT`uz~
  11129. {vuj\JA+5
  11130. )+8+)*+?c
  11131. xxzzxzx`KS
  11132. ``K:HHNC
  11133. `SQKDDKNTu
  11134. }vvc\
  11135. +)*8Ejuvxx
  11136. wTK`iYK:KK
  11137. DSSKKkx{{~
  11138. {vc\E9+5
  11139. *+E\jux
  11140. xkSTiiWS:K
  11141. DSh`WTfkx{
  11142. |~{voc\990
  11143. !*5Z\
  11144. weT`ei`T:K
  11145. !,TSKDDW
  11146. mh`T`mz{
  11147. }zvujC85+,
  11148. Ecjuxx
  11149. ~zzlWSWmsh
  11150. WCST5,
  11151. DK`imiS`ex
  11152. |{uj\E,,*
  11153. -Ejjvx
  11154. xeTSWmshWC
  11155. !!&0KKDDK
  11156. bhmmSfsxx{
  11157. |{uo\E5+
  11158. mm`TCSSC,'
  11159. !&',CSLDS
  11160. bmmYeu
  11161. xvj\9+
  11162. E\jox{zz{z
  11163. xwlTC9/A[K
  11164. :5HT5,
  11165. ''?HSKD
  11166. issmmTmx
  11167. ~zzxukc\9+
  11168. #9Ecjuvxx
  11169. zzxwwmH5%
  11170. %/=/5HH95!
  11171. KDDYi
  11172. mwzz~~zzxu
  11173. uj\9+#
  11174. )2Ojv
  11175. usse/
  11176. #!#)CKKC
  11177. D`ill``Kmw
  11178. xuj\5)!
  11179. wuumk[
  11180. ,55,,=We[[
  11181. xkcZ5#
  11182. .?E\jppk
  11183. uuwmmJ
  11184. /''/>AAHHK
  11185. zxuucZ+
  11186. 2JOVj
  11187. kkmmC
  11188. zxukcA
  11189. Jegme0
  11190. zxfE0(
  11191. #++-9+/9c
  11192. ,emwx
  11193. zxucJ5*
  11194. !+-22*!
  11195. ,mmwz
  11196. zxwkcM5*
  11197. ,menx
  11198. xxkjZR)#
  11199. swwuukccJ2
  11200. ``tupnkjcJ
  11201. e\\9+
  11202. ++.)+
  11203. )-?Zg
  11204. #2+.*U
  11205. +29-)##
  11206. ##3?`guE+
  11207. I?))(!!)!
  11208. )Zgmsw
  11209. -Egmf?+-,
  11210. Jctuzc9
  11211. mg0##
  11212. uwz\+
  11213. !!+uxwmm?
  11214. )2kqqA)
  11215. 5uxwsm9
  11216. !*9uxw
  11217. +ckeV9
  11218. #!.0,
  11219. 0RZJH%
  11220. ?ZutjcJ,!
  11221. ZguujcJ55?
  11222. OVkkecHHZg
  11223. 9JcecZJZck
  11224. !+9CZcJMe
  11225. kkJ5*
  11226. ??Z\JJckkN
  11227. %9ZZII0!
  11228. TekVW[iT5
  11229. 70+\efgg0
  11230. ]WelkN5
  11231. eTZ\ekuuZ5
  11232. Zcacc
  11233. WWiniW50&
  11234. CZ]xnNcTc
  11235. ekkeZ(
  11236. Y[illTCI$
  11237. ]qkJ]`cgek
  11238. \\jjk
  11239. keeln
  11240. &,.Kk
  11241. kVkT\cc\JJ
  11242. \uvuukekwx
  11243. xppleWKC
  11244. 55CTT
  11245. pkT]cT\\ZJ
  11246. \couuq
  11247. kekxxqnle[
  11248. JckkT]ccZZ
  11249. JZC+)
  11250. ckokkekxxq
  11251. ppn]`fiH,
  11252. ,5T[WWm
  11253. lkYWeecTJ\
  11254. eeuxqqpn]`
  11255. [eeD,
  11256. 5C`[WWnl
  11257. cJJZ5
  11258. pqqVNJW`]`
  11259. *HSee
  11260. depwnlee
  11261. e]kkeUCHD=
  11262. =DKHD9*
  11263. &0T`e[el
  11264. llkpujc\?)
  11265. \cU\UV]
  11266. [THC::CDHH
  11267. `e]nw
  11268. nllqxujcC,
  11269. AAJZ\\UU
  11270. TTH::H>:5
  11271. !,HWY`
  11272. [T]pq
  11273. kkpxvujJ5
  11274. /9JJHT
  11275. ,CTJN
  11276. TTNkp
  11277. pknxxvucC
  11278. [[\JJC9,*
  11279. !%CJK=
  11280. KTT[kpqqpk
  11281. pqxuu\J
  11282. '9CHH
  11283. 9JH5:
  11284. HJJT[[]\]k
  11285. kvxucJ
  11286. 5CC9>9AA
  11287. ,>CC:
  11288. ]]ekoqpcA
  11289. )9AHHJ
  11290. ]ccekoo\C
  11291. ,9JUT
  11292. `RTN]
  11293. cVjjcA9
  11294. ,9JJce
  11295. ecTTU]]c\c
  11296. )+9JcUV
  11297. 9AVcJ
  11298. Jc\UVc>9
  11299. +9JaZJ
  11300. \c\\J9+
  11301. *,9OJ\J
  11302. +2AEJ
  11303. }}tfa7(7
  11304. XXSXXl
  11305. XSXXS
  11306. I-5ABIBBA
  11307. bgO^avsv\y
  11308. v\isaaA
  11309. `^H?77))*)
  11310. 77)7TsiQAO
  11311. bRU77*)**3
  11312. )*3*)7?T^R
  11313. f.3-*33).3
  11314. 77A3AZ?HHi
  11315. ZZaZZAA)73
  11316. 7TZaZsvv
  11317. IQQIsiTHAA
  11318. *AA77A
  11319. UggisAaZ?
  11320. A!!*7a
  11321. NN`jfkcca-
  11322. #37-cci
  11323. NNfcgkcaa.
  11324. **..!373Sc
  11325. `gjjca-?
  11326. T?3*AHI3*3
  11327. gkccRA
  11328. RH3A7ZZa^)
  11329. ?IRB8]]V..
  11330. gkccHI
  11331. HH?AI^acaA
  11332. NVVfggSI?
  11333. ssvkjvijjR
  11334. WSSjj
  11335. jjbI>5
  11336. RRWi\
  11337. iScUB8A
  11338. ^A!88BW
  11339. --3?8>>::-
  11340. ^OB@B9@@9
  11341. kfQBB
  11342. g^``b
  11343. ]QNV]
  11344. ]fB9/
  11345. *ppIJ
  11346. "#9UQ8
  11347. 8>8@gq
  11348.  89892
  11349. 5I8BABB9BN
  11350. !8QBJOI
  11351. N8*-8>b
  11352. /2//8
  11353. SRI8-38D
  11354. ..->W
  11355. QQU#.I-J
  11356. ]N:885
  11357. B58.)9
  11358. /@Q922
  11359. >bW35
  11360. BAAW8A
  11361. QO.A7-
  11362. #9V@82
  11363. AsaRBI
  11364. 7)3A9
  11365. N588)73b
  11366. g`>82Rbk
  11367. >N`V]:@
  11368. pDVWNN
  11369. ]ND>>
  11370. B8IV]
  11371. -DJNV
  11372. 85-8>DN
  11373. ?S8/2>
  11374. -9>>D
  11375. DD:29@>
  11376. 9223a
  11377. ::>:>92.
  11378. 299>9:@
  11379. ."?>1"=<"."11"=11?=1."?1
  11380. L51C??1"??"==?>==.=CL=E
  11381. =8CSL1>SL=>CLC
  11382. 111111""11
  11383. ?"'2"?
  11384. "?<11"?5.""<1?"1>"=1=??=1=L>1CLC==C\>?CLC==CMCLCG=
  11385. ?".""?1"".1"".1"".."?".1?".
  11386. "?1#1??15?===?L>C=?5=CL<5
  11387. C<@LLGFSXMFC
  11388. ?"11"""."?5<""11."==?=11=?=1=CL=>L
  11389. Q;CSMP@^idN^dd``
  11390. "?111.11".11"?
  11391. ?L=5??>>?LMK=LNWNL[[k`d[``kWW``
  11392. .1%""
  11393. .".1.""1
  11394. """="??====IC\IINXbK``b@[`id
  11395. `ki[`id
  11396. ."11""11"""1"?11=?"
  11397. %??=1=SMFV`pKINggWSNdN^NWd``Wd``WW
  11398. ."""1.
  11399. "11""1
  11400. 1??#5"?
  11401. 5B1:=LQ>GLQIIC^[[^^[NX^K
  11402. \\K[Nr[KNlgKMXi[[
  11403. 1""11"?=.""?.="QI^NWVN`WPW``WN`kW@NngFNi`VNSbW[Nd[[N\W
  11404. ""11""1"""15??<1"
  11405. SRKbX[
  11406. Nl[KM``W[``WN`[[bXW[oNgK^k`F@MNK[``
  11407. ?LB=LSd
  11408. NdWgN^bg
  11409. "==".=?L
  11410. LIVLd@RXi[FiXgRW`^8
  11411. ?1."".
  11412. =?LEINiWK^ld
  11413. NXo[N\XgN^d[1
  11414. 1?L;ES\IECSVECNdW`Nd\W`gWS`[W
  11415. 71>=Q[KCLVN`SW[`iWK^`[KNl`RWXn[KSlgRL^g[NB
  11416. ""?FI^NE@NXWFN^WP
  11417. `iWKNiV[Nk^[N^gW`^dN`^W[`bB
  11418. ?SR;Ll[gK\`[NS`[dN`[[N`[W
  11419. `[Wkk[P^
  11420. kFWnkWI^kQ   7 (
  11421. 1<<>LKWN^V@
  11422. SW@[XaRN`iK
  11423. ^loK@X^[N
  11424. N[N\`[gN^KWQ*
  11425. 12;CC@;SXWFPNd@E`gW@\Nd@`Nbd
  11426. NdgN`dd
  11427. dKEN`[@N^WE7
  11428. 5>2@NMK@N^KRMMg
  11429. XLWWN\[
  11430. Nc`@[ciKRNk[B`igRINgIWN`d\S[[^NID 
  11431. 2555@IR@NNEKN
  11432. R@NiWANXkF
  11433. NbWRNXg
  11434. Mbg[N\d[[SV
  11435. ^NVFNlMKK`kRRik[;CcD
  11436. 25&2@N@F@NNFNX
  11437. R>N`KRNggV
  11438. [[WNN[^X`WK`
  11439. bFN`kP
  11440. `\RN^dWNM[[NLPKNH
  11441. 22&2@K
  11442. NW[`NVKM
  11443. V@Ki`F
  11444. Ni`KM\i[KX`dKLd[[SMNdN^KW^N[K^`WRW
  11445. `F>NN;% 
  11446. 55;2@N[@@
  11447. `WK`[bN[[g`N^W``bK[
  11448. [`d@WXdRK`g[KM`WNMN@
  11449. 5@;5CMKKNM[NM^KWN\KK`N[@\XdKW`k[I^i[RWNo[INbgWN^d
  11450. `Wdg`dR[
  11451. 225@@IFKN^RR
  11452. bKKN`d[W^g
  11453. `^[N^^W[N\^RN\iKK`i[K``gRN``RMNgKK@@22
  11454. 52&5CK@IN`IIN^[WNWWNNMRN`NWWN`WR``dRNX^WKNiWK
  11455. b^[N\b[`SW[`^V[``WK@SK2
  11456. &&2@K
  11457. $&55>@KMI
  11458. SXWRN^`KKS`[W^`gWN`[bSWK[^^WN^NWF^``RK`kRKk`WF@NK222
  11459. 5@;5M`R@N`dK
  11460. VWN`^RK`iW@^X[@WicK[\`[@Vig[^^[[`^[[N^@5
  11461. &99,&
  11462. 5@@@K
  11463. [MLK[N^K
  11464. ^^WFW`dKI``WI^`[RN
  11465. dVW`gWN^[V`^^KWNWR[`XWKNiW@[Nd@@
  11466. 99,,&
  11467. mmwidget.ico
  11468. wwwwp
  11469.