Choose a bitmap file for this button. (.dib or .bmp extensions)
Choose Bitmap File
OpenDlg
fileName
fileName
Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
cancel
Invalid number of coordinates.
isNumber
Coordinate number
is not a number.
Multimedia, MCI and Toolbook
Widget Font Quick Reference
4s_oldScroll
"widgetFont"
"bigfontlist"
enterpage
leavepage
enterpage
widgetFont
s_oldScroll
leavepage
bigfontlist
widgetFont
s_oldScroll
The Widget Font
Quick Reference
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.
This font contains symbols for many multimedia controls and operations. This table shows the ANSI values with the corresponding characters.rs.
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.
Some characters in this font are designed to be used in pairs, for instance
The next page explains some of the advantages and disadvantages of using this special font...
ANSI Widgettttt
widgetFont
buttonDown
buttonDown
textFromPoint
32
33 !
34 "
35 #
36 $
37 %
38 &
39 '
40 (
41 )
42 *
43 +
44 ,
45 -
46 .
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
62 >
63 ?
64 @
65 A
66 B
67 C
68 D
69 E
70 F
71 G
72 H
73 I
74 J
75 K
76 L
77 M
78 N
79 O
80 P
81 Q
82 R
83 S
84 T
85 U
86 V
87 W
88 X
89 Y
90 Z
91 [
92 \
93 ]
94 ^
95 _
96 `
97 a
98 b
99 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 ~
"bigFontList"
printerPageBitmap
FALSE
buttonUp
buttonUp
bigFontList
bigFontList
bigFontList
Print Font Reference Sheet
"bigFontList"
B"bigfontList"
buttonUp
buttonUp
bigFontList
bigfontList
Show Font Reference Sheet
Click a character to copy it to the clipboard.
bigfontlist
bigfontlist
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
[OK]
bigFontList
&4S^/
buttonUp
buttonUp
Cover Page
| T y
Multimedia Widgets
Multimedia Widgets
This book contains ToolBook objects that can be copied and pasted into your own ToolBook application.
This book contains ToolBook objects that can be copied and pasted into your own ToolBook application.
buttonUp
buttonUp
Continue
"map"
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
oft Exce
Cover Page
What these objects do:
Page Title
Description
Dependencies
Instructions:
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
Previous
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
"map"
buttonUp
buttonUp
defStroke
0,0,0
txClassName
button
Search
buttonUp
buttonUp
search
, OK
J > defStroke
0,0,0
^ txClassName
button
Search...
Instructions on how to install Widgets into your own book will appear in this space.
Widgets throughout this book appear on pages like this one.
The Widgets will appear in this space. space.
An explanation of what the Widgets do will appear in this space.K
The Widget's title appears here.e.
buttonUp
buttonUp
Continue
Sloc, isShift
H0,30
4s_scroll
FALSE
"icons"
clearExplanation
"explain"
enterPage
leavePage
rightButtonUp
clearExplanation
rightButtonUp
isShift
enterPage
icons
s_scroll
leavePage
clearExplanation
clearExplanation
explain
icons
s_scroll
">#~#
9,;X<
FHLHLHL
This is the map page.
Click topic names shown in black and white to go to a topic.
icons
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
Previous
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
defStroke
0,0,0
txClassName
button
Search
buttonUp
buttonUp
search
defStroke
0,0,0
txClassName
button
Search...
"Wave Audio:
File Buttons"
buttonUp
buttonUp
Wave Audio: Wave File Buttons
Wave Audio
"Bitmap Graphics:
Buttons"
buttonUp
buttonUp
Bitmap Graphics: Bitmap Buttons
Bitmap Graphics
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
offsetNumber
Generic Bitmap Buttons
A Bitmap Index
"CD Audio:
Event Editor"
buttonUp
buttonUp
CD Audio: Event Editor
CD Audio
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
offsetNumber
Small Controls
Large Controls
Track Selector
Capability and Status
Event Editor
CD to Wave Converter
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
offsetNumber
Generic MIDI Buttons
Simple Controls
Capability and Status
Event Editor
MIDI to Wave Converter
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
Animation
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
offsetNumber
Generic Animation Buttons
More Buttons
Control Panel
Capability and Status
Event Editor
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
Videodisc
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
"offsetNumber
Simple Controls
A Control Panel
Capability and Status
Event Editorr
Timers
"Generic:
3D Objects"
buttonUp
buttonUp
Generic: 3D Objects
Generic Controls
"About This Widget Book"
buttonUp
buttonUp
About This Widget Book
Reference
"Bitmap Graphics:
Buttons"
buttonUp
buttonUp
Bitmap Graphics: Bitmap Buttons
H&offsetNumber
Generic Bitmap ButtonsSimple Controls
Recording Controls
Capability and Status
Sound and Animation
Event Editor
& "}," & \
," & \
," & \
," & \
"CD Audio:
Event Editor"
buttonUp
buttonUp
CD Audio: Event Editor
'offsetNumber
Event Editor
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
.*offsetNumber
3D Objects
Horizontal Sliders
Vertical Sliders
Fancy Sliders
Dog Sliders
Audio Mixer
Animation
Event Editor
& "}," & \
," & \
," & \
," & \
"Generic:
3D Objects"
buttonUp
buttonUp
Generic: 3D Objects
\,offsetNumber
3D Objects
"Generic:
Horizontal Sliders"
buttonUp
buttonUp
Generic: Horizontal Sliders
-offsetNumber
Horizontal Sliders
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
\/offsetNumber
About this Widget Book
About Multimedia
Font Quick Reference
Using the Widget Font
Widget Dependencies
Using Check Functions
Window Styles
"About This Widget Book"
buttonUp
buttonUp
About This Widget Book
~1offsetNumber
About this Widget Book
"Widget Font Quick Reference"
buttonUp
buttonUp
Widget Font Quick Reference
2offsetNumber
Font Quick Reference
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
|4offsetNumber
Simple Timing Controls
Capabilityndex
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
6offsetNumber
Generic Wave Buttons
Simple Controls
Recording Controls
Capability and Status
Sound and Bitmaps
Sound and Animation
Event Editor
," & \
," & \
," & \
"Wave Audio:
File Buttons"
buttonUp
buttonUp
Wave Audio: Wave File Buttons
29offsetNumber
Generic Wave Buttons
Simple Controls
Recording Controls
Capability and Status
Sound and Animation
Event Editor
& "}," & \
," & \
," & \
," & \
"Wave Audio:
Sound
Animation"
buttonUp
buttonUp
Wave Audio: Sound and Animation
:offsetNumber
Sound and Animation
"Wave Audio:
Sound
Bitmaps"
buttonUp
buttonUp
Wave Audio: Sound and Bitmaps
<offsetNumber
Sound and Bitmapson
Beginner:
"Beginner widgets only need
be copied
pasted
your own
Fhave a media file
pspecified
them."
buttonUp
buttonUp
Beginner widgets only need to be copied and pasted into your own application, and then have a media file name specified for them.
Intermediate:
"Intermediate widgets need
be copied
pasted
your
Fhave more than one
G file
pspecified
them.
Or they may
points
a sound clip
buttonUp
buttonUp
Intermediate widgets need to be copied and pasted into your application, and then have more than one media file name specified for them. Or they may need the start and end points of a sound clip specified.
\B4BYB
Advanced:
"Advanced widgets require doing some OpenScript coding."
buttonUp
buttonUp
Advanced widgets require doing some OpenScript coding.
"Multimedia, MCI
Toolbook"
buttonUp
buttonUp
Multimedia, MCI and Toolbook
xDoffsetNumber
About Multimedia
"Topics shown
are only available
fthe full version
Multimedia ToolBook
Asymetrix's
Resource Kit."
buttonUp
buttonUp
Topics shown in gray are only available with the full version of Multimedia ToolBook and Asymetrix's Multimedia Resource Kit.
4s_device
Zswitch, x
-(y1,
"off"
tbkMCI("stop cdAudio wait","")
--use
asure
worked
:close
5","")
0,50.1875,0
the CD
tbkMCIchk("
shareable","",1,1)
ms","",1)
audio
on","")
--beginning
atus
track 1","")
H1000
" &&
msf","",1,1)
FALSE
updateStatus
buttonUp
buttonUp
false
stop cdAudio wait
tbkMCI
close cdAudio
tbkMCI
open cdAudio shareable
tbkMCIchk
set cdAudio time format ms
tbkMCIchk
set cdAudio audio all on
tbkMCI
status cdAudio position track 1
tbkMCI
seek cdAudio to
tbkMCI
set cdAudio time format msf
tbkMCIchk
cdAudio
120,50,100
_9updateStatus
switch
s_device
MIDI Sequencer: Buttons
Page Index
Generic: Horizontal Sliders
Wave Audio: Wave File Buttons
tbkMCI("close waveFile","")
enterPage
leavePage
enterPage
leavePage
close waveFile
tbkMCI
1. Copy one of these buttons to the clipboard.
2. Go to your own ToolBook application and make sure you're at Author level.
3. Paste the button from the clipboard into your own application.
4. Switch to Reader level.
2. Click the button you pasted with your RIGHT mouse button
3. You'll be prompted for a file name. Choose the name of a wave audio file and click OK.
4. Click the button with your LEFT mouse button to play the wave file.
5. To assign a different wave file to the button, RIGHT click it again.
These buttons play wave audio files.
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.
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.
file.
editScript "wait",
B"Play
Wait"
buttonDown
buttonDown
editScript
Play and Wait
editScript "
B"Play And Notify"
buttonDown
buttonDown
editScript
Play And Notify
Generic Wave Buttons
Play and Wait
ofileName
tbkMCI("status wavefile mode","")
c"play"
,close waveFile","")
alias
tbkMCIchk("
" &&
&& "
H,1,1)
X wait","",1)
--prompt
OpenDlg(".", "*.
", "Choose a
B.", "
Wave
buttonDown
rightButtonUp
buttonDown
fileName
prightButtonUp
status wavefile mode
tbkMCI
close waveFile
tbkMCI
fileName
alias waveFile
tbkMCIchk
play waveFile wait
tbkMCIchk
close waveFile
tbkMCIchk
rightButtonUp
*.wav
Choose a wave file for this button.
Choose Wave File
OpenDlg
fileName
fileName
Play and Wait
Play and Notify
ofileName
tbkMCI("close waveFile","")
tbkMCIchk("
" &&
M && "alias
/,1,1)
)play
tbkmmNotify
lstatus
g mode","")
c"stop"
OpenDlg(".", "*.
", "Choose a
B.", "
Wave
uttonDown
tbkmmNotify
buttonDown
rightButtonUp
buttonDown
fileName
prightButtonUp
close waveFile
tbkMCI
fileName
alias waveFile
tbkMCIchk
play waveFile
tbkMCIchk
tbkmmNotify
status waveFile mode
tbkMCI
pause
close waveFile
tbkMCI
rightButtonUp
*.wav
Choose a wave file for this button.
Choose Wave File
OpenDlg
fileName
fileName
Play and Notify
Copy Object
"copyInstructions"
Zobj, pos
eatclicks()
"down"
objectFromPoint(
buttonDown
buttonUp
buttonDown
copyInstructions
buttonUp
eatclicks
copyInstructions
eatclicks
copyInstructions
of background
hotword
recordfield
Click me to copy a button
About This Widget Book
noAutoName
About this Widget Book(Please read this))))
Widget: A small contrivance.
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.
When the devices and drivers are available, the widgets in this book are fully functional. Some require data files.
e pasted a widget, you can..............................................
You can use the widgets in several ways:
* 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.
* Copy widgets and control panels, then paste them into your applications. You can modify them to suit your particular requirements.
* Use widget scripts as examples for your own scripts.
dia extensions to ToolBook. Most widgets are directly MCI-compatible.
-compatible.
ompatible.
irectly MCI-compatible.
* You can use the widget book to exercise the system.
* Use the widget book to exercise the system.
* 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.
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.
About this Widget Book
raphics: Dynamic Bitmap
Window Styles
Bitmap Graphics: Bitmap Buttons
--close bitmap that might be
tbkBitmap("
)dibFile")
leavePage
leavePage
close dibFile
tbkBitmap
close
1. Copy one of these buttons to the clipboard.
2. Go to your own ToolBook application and make sure you're at Author level.
3. Paste the button from the clipboard into your own application.
4. Switch to Reader level.
5. Click the button you pasted with your RIGHT mouse button
6. You'll be prompted for a file name. Choose the name of a bitmap file and click OK.
7. Click the button with your LEFT mouse button to show the bitmap.
8. Click the bitmap to close it. If its in an overlapped window, press Alt+F4 to close it.
9. To assign a different bitmap to the button, RIGHT click it again...
These buttons let you show device independent bitmaps (DIBs) in their own windows.
They use the translateWindowMessage control structure to trap mouse clicks in the bitmap window. This sends a ToolBook message. The message's handler closes the bitmap file. The Overlapped Window Style button also traps a windows destroy message..
editScript "translatewindowmessage
s_bmpHandle",
B"generic popup bitmap"
buttonDown
buttonDown
editScript
translatewindowmessage for s_bmpHandle
generic popup bitmap
editScript "
bmpWindowClose
B"generic overlapped bitmap"
buttonDown
buttonDown
editScript
before 2 send bmpWindowClose to self
generic overlapped bitmap
Generic Bitmap Buttons
close
Click the bitmap's window to close it.
Generic Popup Bitmap
Popup Window Style
Generic Child Bitmap
Child Window Style
Generic Overlapped Bitmap
Overlapped Window Style
Copy Object
"copyInstructions"
Zobj, pos
eatclicks()
"down"
objectFromPoint(
buttonDown
buttonUp
buttonDown
copyInstructions
buttonUp
eatclicks
copyInstructions
eatclicks
copyInstructions
of background
hotword
recordfield
Click me to copy a button
4s_bmpHandle
ofileName
rightButtonup
B's bitmap
fa popup
tbkBitmapchk("
" &&
d && "alias dibFile style
B", 1, 1)
" &&
ox & "," &
oy,1)
Rate
translating
emessages
("status
translatewindowmessage
bmpWindowClose
bmpButtonup
--dismiss
they click
BMPbuttonUp
untranslateAllWindowMessages
("close
a timer
edirectly (Alt-f4)
lets
efinish closing
4sending a
--which
turn sends a bmpButtonDown
windows
tbkTimerStart("single",500,100,
tbkMMTimer
bmpButtonUp
OpenDlg(".", "*.*", "Choose a
(.dib
extensions)", "
ox & "," &
"0,0"
("Would you like
specify
e? If so, please enter 2 numeric coordinates."
) <> 2
"Invalid
x"0"
xisNumber(
"Coordinate
z" && i && "
tonUp
buttonUp
bmpWindowClose
tbkMMTimer
BMPbuttonUp
rightButtonUp
buttonUp
fileName
prightButtonup
fileName
alias dibFile style popup
tbkBitmapchk
window dibFile position
tbkBitmapchk
window dibFile state show
tbkBitmapchk
status dibFile window
tbkBitmap
bmpWindowClose
bmpButtonup
s_bmpHandle
BMPbuttonUp
close dibFile
tbkBitmap
s_bmpHandle
bmpWindowClose
single
tbkTimerStart
tbkMMTimer
bmpButtonUp
rightButtonUp
Choose a bitmap file for this button. (.dib or .bmp extensions)
Choose Bitmap File
OpenDlg
fileName
fileName
Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
cancel
Invalid number of coordinates.
isNumber
Coordinate number
is not a number.
CD Audio: Event Editor
More Buttons
Generic: 3D Objects
Generic: 3D Objects
1. Copy one of these objects to the clipboard.
2. Go to your own ToolBook application and make sure you're at Author level.
3. Paste the object from the clipboard into your own application.
4. Resize it or reposition it.
Notes:
The 3D objects on this page are simple graphic objects that can be useful in your layouts. They are intended to be used on a gray background. These objects are actually groups; don't use too many at a time.
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.
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.
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.
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.
These objects can be copied to your application to give it a 3D appearance.
3D Objects
(this is a field)
txClassName
3D recessed
txClassName
txClassName
txclassname
3DFrame Recessed
txClassName
txClassName
txClassName
3Drecessed
txClassName
3Drecessed
txclassname
3DFrame
Copy Object
"copyInstructions"
Zobj, pos
eatclicks()
"down"
objectFromPoint(
buttonDown
buttonUp
buttonDown
copyInstructions
buttonUp
eatclicks
copyInstructions
eatclicks
copyInstructions
of background
hotword
recordfield
Click me to copy an object
Generic: Horizontal Sliders
just displays the slider
thumbe
being moved
message so
OysBook gets
txClassName
sliderPosition
%"0.00"
"sposition"
"sPosition"
buttonstilldown
buttonup
leavePage
buttonstilldown
txClassName
thumb
sliderPosition
sposition
buttonup
sPosition
leavePage
sPosition
+n'n'h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0h0
1. Copy a slider to the clipboard.
2. Go to your own ToolBook application and make sure you're at Author level.
3. Paste the slider from the clipboard into your own application and name it "slider", or any name you wish.
To set the position of a slider:
In OpenScript, say:
set sliderPosition of group "slider" to 1
The sliderPosition can be any value between 0 and 1.
To get the position of a slider:
In OpenScript, say:
get sliderPosition of group "slider"
The position of the slider will be stored the OpenScript variable "it".med "slider".
To get the position of a slider:
get its SliderPosition.
To set the position of a slider: a slider: is property can be "vSliderThumb" or
"hSliderThumb" , depending on the orientation of the slider. The script for this page intercepts buttonStillDown and buttonUp messages to display the slider position.ending on the orientation of the slider. The script for this page intercepts buttonStillDown and buttonUp messages to display the slider position.
"To give your slider a
Fchoose the ""Group Properties""
Object""
buttonUp
buttonUp
To give your slider a name, select it and then choose the "Group Properties" menu item from the "Object" menu.
Sliders are grouped ToolBook objects that provide a way to control and display the position of multimedia elements.
The topmost object in these groups is called a "thumb" object. You can read and set the position of the thumb. The SliderPosition is always expressed as a floating point number between 0 and 1. When the thumb object of a horizontal slider is at the far left position, its parent's SliderPosition will be 0. If the thumb object is at the far right, its parent's SliderPosition will be 1.
This page has a script which displays the sliderPosition in a text field. If you try the same thing, make sure to forward the buttonStillDown message to the sysbook.ssage to the sysbook.
editScript "
buttonDown
buttonDown
editScript
to handle buttonstilldown
editScript "
buttonDown
buttonDown
editScript
forward
Horizontal Sliders
0.6983471074380165
txClassName
Slider
follower
rectangle id 6 of page id 15
width
glide
roundedrectangle id 54 of page id 15
txClassName
hSliderThumb
Button
0.130568356374808
txClassName
Slider
txClassName
hSliderThumb
glide
group id 101 of page id 15
width
follower
rectangle id 6 of page id 15
Button
0.3248175182481752
txClassName
Slider
!txClassName
hSliderThumb
"glide
roundedrectangle id 76 of page id 15
L"B"width
^"follower
rectangle id 6 of page id 15
Button
0.7471264367816092
#txClassName
Slider
|#p#hilight
false
#width
#glide
button id 103 of page id 15
#txClassName
hSliderThumb
Button
\$B$s
0.6089743589743589
p$txClassName
Slider
$txClassName
hSliderThumb
%glide
button id 107 of page id 15
:%0%width
J%hilight
false
Button
0.346512661039538
%txClassName
Slider
X&N&width
&f&glide
line id 111 of page id 15
&txClassName
hSliderThumb
sposition
sposition
Slider Position:
Copy Object
"copyInstructions"
Zobj, pos
eatclicks()
"down"
objectFromPoint(
buttonDown
buttonUp
buttonDown
copyInstructions
buttonUp
eatclicks
copyInstructions
eatclicks
copyInstructions
of background
hotword
recordfield
Click me to copy an object
Videodisc: Event Editor
Widget Font Quick Reference
CD Audio: Event Editor
5J6z7
9&E&E
noCopy
1. Make sure you have a CD in your CD player and click the Driver On/Off switch to turn the CD device on.
2. Click the Play button to start playing the CD.
3. Find the spot on the CD where you want to begin making the clip by clicking the Scan, Skip and Play buttons.
4. Click the Start Clip button while the CD is playing to note the beginning of the clip.
5. Click the End Clip button to note the end of the clip. You can edit the text of the Start Clip and End Clip text fields.
6. Click the Restart Clip and Play Clip buttons to review your CD clip.
7. When you're satisfied with your clip, click the make the CD clip button button.
8. Go to your own ToolBook application and make sure you're at Author level.
9. Paste the button from the clipboard into your own application.
10. Switch to Reader level.
11. Click the button to play your CD clip..
The controls on this page let you select a clip from a CD and create a button that plays that clip.
The Driver On/Off widget opens and
closes the device and initializes the disc.
The Track and Position fields are updated by an idle handler which queries the status of the CD audio driver. You must copy the handler into the page or background where you paste these elements if you want them to update correctly. want them to update correctly.
Choose a bitmap file for this button. (.dib or .bmp extensions)
Choose Bitmap File
OpenDlg
fileName
fileName
Would you like to specify the position of the window? If so, please enter 2 numeric coordinates.
cancel
Invalid number of coordinates.
isNumber
Coordinate number
is not a number.
Wave Audio: Sound and Animation
MIDI sequencer: Simple Controls
Bitmap Graphics: Bitmap Buttons
CDAudio: Controls (1)
Wave Audio: Wave File Buttons
Wave Audio: Sound and Animation
1. Click the Roll the Wheel button to see animation during wave audio.
Notes:
Wave audio files can be be played during animation sequences without interruption by using the yieldApp( ) function from TBKWIN.DLL. The yieldApp( ) function is linked in the enterBook handler in the sysBook. The hold parameter for the play command prevents a lapse in the animation when the sound file finishes playing.
The picture of the wheel is actually a special character from the Widgets font. There are 4 textlines in the field, each with a different Widget font character. The wheel rolls by setting the scroll property of the text field while moving it to the right.the text field while moving it to the right.y of the text field while moving it to the right.
editScript "
yieldApp()",
B"Roll The Wheel"
buttonDown
buttonDown
editScript
get yieldApp()
Roll The Wheel
editScript "yieldApp()", tbkmmsbk()
buttonDown
buttonDown
editScript
yieldApp()
tbkmmsbk
editScript " hold",
B"Roll The Wheel"
buttonDown
buttonDown
editScript
hold
Roll The Wheel
editScript "
B"Roll The Wheel"
buttonDown
buttonDown
editScript
set scroll
Roll The Wheel
These objects demonstrate synchronizing wave audio with font animation.
Please examine the script of the Roll the Wheel button.Wheel button..
B"Roll the Wheel"
buttonDown
buttonDown
Roll the Wheel
Sound and Animation and Anima
wheel
Roll the Wheel
4s_path
Zi, j
the wave file
tbkMCIchk("
" &&
? & "train.
( alias waveFile","",1,1)
--play
V"hold" parameter
--also specifying
notification
--use yieldApp()
sound
playing
--loop through
font animation
--animate
idget
moving
"wheel"
H45,0
--
o avoid gaps
audio
--reset
H-3600,0
tbkmmnotify
tbkmci("close
buttonDown
tbkmmnotify
buttonDown
train.wav alias waveFile
tbkMCIchk
play waveFile from 0 hold
tbkMCIchk
yieldApp
wheel
wheel
yieldApp
wheel
j:to1
s_path
tbkmmnotify
close waveFile
tbkmci
fileName
D:\MM\WIDGET\bells.wav
Roll the Wheel
MIDI sequencer: Status
M\D|D|u
System
M\D|D|u
aboutdlginit
M\D|D|-
bookMarks
Wave Audio: Wave File Buttons,Map
gD|D|}
The Mini Widgets Book
C:\TOOLBOOK\tbkmm.sbk
:PRINTLAYOUT
gD|D|}
system
G\D|D|
TBKWidgets
gD|D|}
\D|D|
pageList
\D|D|
TBKWidgets
\D|D|
TBKWidgets
u\zp
system
gD|D|}
gD|D|}
KWidgets
\D|D|
gD|D|}
TBKWidgets
gD|D|}
gD|D|}
sysBookPath
D:\MM\tbkmm.sbk
aaaaaaaaaa
tbkmm.sbk
ltimedia Widgets
Wave Audio: Simple Controls,Map
s Widget Book
Wave Audio: Wave File Buttons,Map
dget Book
poration. All Rights Reserved
Shabbir Dahod
Michelle DeWilliam
Jim Gallant
Mike Miller
Claude Ostyn
Craig Schwandt
,b14,TRUE
aboutdlgbox
get Font - Quick Reference
Using the Widget font in apps
Optimizing Slider Performance
Use this page for your own notes
KWidgets
\D|D|
,h11,
,s12,Multimedia Widgets
,s13,Copyright 1991 Asymetrix Corporation. All rights reserved.
,b14,TRUE
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
get tbkMCI("set cdAudio time format to" && oldTimeFormat,"")
get tbkMCI("close cdAudio","")
A button that plays a CD from
has been copied to the clipboard.
JrunBook
startPos
endPos
owaveFileName
setWaveFile
oDIBFileName
setDIBFile
--close
b file
already
tbkMCI("status wavefile mode","")
c"play"
","")
B's bitmap
fa popup
tbkBitmapchk("
" &&
oDIBfileName && "alias dibFile style child
" && sysClientHandle, 1, 1)
6ate
translating
emessages
bmpHandle
translatewindowmessage
bmpButtonup
tbkMCIchk("
" &&
&& "
","",1,1)
wait","",1)
","",1)
--prompt
OpenDlg(".", "*.wav", "Choose a
B.", "
ndib", "
.bmp extensions)", "
--dismiss
they click
BMPbuttonUp
untranslateAllWindowMessages
ghtButtonUp
buttonDown
setWaveFile
setDIBFile
rightButtonUp
BMPbuttonUp
buttonDown
waveFileName
setWaveFile
DIBFileName
setDIBFile
status wavefile mode
tbkMCI
close waveFile
tbkMCI
DIBfileName
alias dibFile style child parent
tbkBitmapchk
window dibFile state show
tbkBitmapchk
status dibFile window
tbkBitmap
bmpButtonup
waveFileName
alias waveFile
tbkMCIchk
play waveFile wait
tbkMCIchk
close waveFile
tbkMCIchk
bmpHandle
rightButtonUp
setWaveFile
setDIBFile
setWaveFile
*.wav
Choose a wave file for this button.
Choose Wave File
OpenDlg
fileName
waveFileName
setDIBFile
*.dib
Choose a bitmap file for this button. (.dib or .bmp extensions)
Choose Bitmap File
OpenDlg
DIBFileName
DIBFileName
BMPbuttonUp
close dibFile
tbkBitmap
bmpHandle
widgets
setScroll
"Description"
"Dependencies"
rf > 0
rf = 0
enterPage
setScroll
enterPage
setScroll
Description
setScroll
Dependencies
setScroll
scrolling
scrolling
What these objects do:
Page Title
Description
Dependencies
copyInstructions
Click an object to copy it to the clipboard.
Instructions:
buttonUp
buttonUp
defStroke
0,0,0
txClassName
button
Previous
buttonUp
buttonUp
defStroke
0,0,0
txClassName
button
buttonUp
buttonUp
defStroke
0,0,0
txClassName
button
"map"
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
Search
buttonUp
buttonUp
search
txClassName
button
defStroke
0,0,0
Search...
widgets
reference
Page Title
descr1
descr2
descr3
explain
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
Previous
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
buttonUp
buttonUp
txClassName
button
defStroke
0,0,0
"map"
buttonUp
buttonUp
defStroke
0,0,0
txClassName
button
Search
buttonUp
buttonUp
search
defStroke
0,0,0
txClassName
button
Search...
reference
Multimedia, MCI and Toolbook
Multimedia, MCI and ToolBook
Multimedia ToolBook allows you to use all the devices shown on the map page. These Widgets rely on Windows' Media Control Interface (MCI).
MCI is a string interface that allows you to make standard function calls to a various devices without having to worry about the type or make of the device. This standard protocol simplifies multimedia development.ment......................owing applications can run on a wider range of hardware.
Multimedia Devices
Multimedia devices are either simple or complex.
Simple devices include videodisc and CD players. No data file name is associated with them. To open and play them, you specify the device name in the function call.
Complex devices include wave audio, MIDI and animation players. To open and play them, you specify a media file name in the function call. These include .wav , .mid , .mmm , .fli and .flc files.
using them..
For best performance, close multimedia data files after using them.
"For example:" & CRLF &
tbkMCI(""
videodisc shareable"",
)" &
0play
buttonUp
buttonUp
For example:
get tbkMCI("open videodisc shareable","")
get tbkMCI("play videodisc","")
"For example:" & CRLF &
tbkMCI(""
water.wav alias
)" &
/play
buttonUp
buttonUp
For example:
get tbkMCI("open water.wav alias water","")
get tbkMCI("play water","")
"Wave audio files use a "".wav"" extension."
buttonUp
buttonUp
Wave audio files use a ".wav" extension.
"MIDI files use a "".
g"" extension."
buttonUp
buttonUp
MIDI files use a ".mid" extension.
"Macromind Director animation files use a "".mmm"" extension."
buttonUp
buttonUp
Macromind Director animation files use a ".mmm" extension.
"Autodesk Animator animation files use "".fli""
"".flc"" extensions."
buttonUp
buttonUp
Autodesk Animator animation files use ".fli" and ".flc" extensions.
"Autodesk Animator animation files use "".fli""
"".flc"" extensions."
buttonUp
buttonUp
Autodesk Animator animation files use ".fli" and ".flc" extensions.
Devices and media files can be opened with an alias . This allows you to refer to a device or a file name with a name that's easier to type or is meaningful.
Make sure to close multimedia data files after using them. You can open media files in an enterPage handler for fast performance.
Simple devices like CD and videodisc can be opened with the shareable parameter. This allows multiple applications to use the same device....
editScript "alias waveFile",
B"Play And Wait"
"Wave Audio:
( Buttons"
buttonUp
buttonUp
editScript
alias waveFile
Play And Wait
Wave Audio: Wave File Buttons
editScript " shareable""",
"Driver switch"
"CD Audio:
Event Editor"
buttonDown
buttonDown
editScript
shareable"
Driver switch
CD Audio: Event Editor
Wave Audio: Sound and Bitmaps
1. Copy one of these buttons to the clipboard.
2. Go to your own ToolBook application and make sure you're at Author level.
3. Paste the button from the clipboard into your own application.
4. Switch to Reader level.
5. Click the button you pasted with your RIGHT mouse button
6. You'll be prompted for a wave audio file name. Choose the name of a wave audio file and click OK.
7. You'll also be prompted for a bitmap file name. Choose the name of a bitmap file and click OK.
8. Click the button with your LEFT mouse button to show the bitmap and play the wave audio file.
9. Click the bitmap to close it if you used the Show and Play button.
10. To assign a different wave audio file or bitmap to the button, RIGHT click it again.
These buttons show bitmaps and play wave audio files.
The Show and Play button opens and shows a bitmap in a child window, then opens, plays and closes a wave file. You must click the bitmap to close the bitmap.
The Show, Play and Close button opens and shows a bitmap in a child window, then opens and plays a wave audio file. Both the wave audio file and the bitmap are closed when the wave audio file finishes playing.bkmmNotify handler closes the wave file.
Sound and Bitmaps
Show and Play
Show and Play
Show, Play and Close
Show, Play and Close
Copy Object
"copyInstructions"
Zobj, pos
eatclicks()
"down"
objectFromPoint(
buttonDown
buttonUp
buttonDown
copyInstructions
buttonUp
eatclicks
copyInstructions
eatclicks
copyInstructions
of background
hotword
recordfield
Click me to copy a button
FALSE
runBook
ToolBook
x"OK"
"The
{you clicked has been copied
the clipboard."
" Would
9like
another instance
now?"
f"&New
"&Existing
"&Cancel"
"toolbook.exe"
setRemote "
"12,104,340,401"
"7,174"
OpenDlg(".", "*.tbk", "Choose your
.", "
Application")
-- MMWIDGET.TBK
Script
-- Contains routines specific
also
-- support
,level modification
pasting
widgets
4s_Path
c"Text"
"Save"
"SaveAs"
"Import"
"Export"
"PrintReport"
"Tutorial"
"Keyboard"
"Commands"
"UsingHelp"
"Glossary"
"Index"
"&Multimedia"
"About This &
..." alias "aboutWidgets"
linkDLL "tbkdlg.dll"
STRING dialog(
Xkernel
WORD GlobalAlloc(
, DWORD)
POINTER GlobalLockPointer_ =
@Unlock(
NFree(
Xuser
bSetTimer(
Y KillTimer(
n bringwindowtotop(
getFocus()
getParent(
getClassName(
LONG sendMessage(
postmessage(
INT setwindowtext(
PeekMsg_ = PeekMessage(
"tbkwin.
tbkmmsbk
sysBookPath
b", "Please find
}.", "
path.")
4s_oldSearch
ZoldPage, prompt
selectedTextState <>
"Cannot
""" &
& """.
beginning
f"&Yes"
"&No"
""" &
& """."
editScript txt, obj
4scriptText, phase, bk
settimer(sysclienthandle,1,100,0)
"Unable
killtimer(
Zhwnd, class
getfocus()
+ <> 0
className(
"BufEdit"
getparent(
~), 273, 6512, 0)
), 273, 2, 0)
)), 273, 6514, 0)
classname
getclassname(
Zinit, retValue
aboutDlgInit
aboutDlgBox
setDefaultButtonStyle
sysButtonStyle
"pushButton"
sysfontFace
"Helv"
sysfontSize
sysfontStyle
sysTransParent
"0,75.3125,0"
isPosInt num
sysDecimal
= < 1
-- Function:
Eatclicks
-- Purpose:
pending keyboard
mouse messages
-- Parameters:
-- Returns:
positive
successful
eatclicks onOrOff
ZwFlags, dwBytes, cnt, hMsg, lpMsg
-- Link
Windows functions
allocate a block
memory only
xdone already
flags
32 --
MSG data structure,
froom
spare
= 0
GlobalFree(
-- We now have a buffer
we can call
-- windows
we don't want
-- Mouse
, 512, 521, 1) <> 0
, 256, 264, 1) <> 0
-- Menu Accelerators
, 111, 112, 1) <> 0
GlobalUnlock(
-- EatClicks
4sFromAppSampler
8"appsamp.
leavePage
enterBook
author
search
leaveBook
editScript
runBook
aboutWidgets
enterpage
setDefaultButtonStyle
classname
tbkmmsbk
isPosInt
eatclicks
button
group
JrunBook
runBook
name of this book
The object you clicked has been copied to the clipboard.
Would you like to run another instance of ToolBook now?
&New Book
&Existing Book
&Cancel
New Book
toolbook.exe
bounds of mainWindow
12,104,340,401
toolbook
position of toolpalette
7,174
toolbook
Existing Book
*.tbk
Choose your ToolBook application.
Choose ToolBook Application
OpenDlg
toolbook.exe
ToolBook
enterBook
SaveAs
Import
Export
PrintReport
newPage
Tutorial
Keyboard
Commands
UsingHelp
Glossary
Index
&Multimedia
About This &Book...
aboutWidgets
sizeToPage
tbkdlg.dll
dialog
GlobalAlloc
GlobalLockPointer_
GlobalLock
GlobalUnlock
GlobalFree
SetTimer
KillTimer
bringwindowtotop
getFocus
getParent
getClassName
sendMessage
postmessage
setwindowtext
PeekMsg_
PeekMessage
kernel
s_Path
leaveBook
tbkdlg.dll
tbkwin.dll
kernel
enterpage
leavePage
author
tbkmmsbk
sysBookPath
*.sbk
Please find the sysBook tbkmm.sbk.
Save the tbkmm.sbk sysBook path.
OpenDlg
tbkmm.sbk
This is not tbkmm.sbk
sysBookPath
search
author
Search for:
Cancel
Cannot find "
". Search from beginning of book?
Cannot find "
oldPage
prompt
s_oldSearch
editScript
settimer
Unable to select text in the script window.
killtimer
scriptText
phase
getfocus
className
BufEdit
getparent
postmessage
setwindowtext
getparent
postmessage
getparent
getparent
postmessage
killtimer
class
phase
scriptText
classname
getclassname
class
aboutWidgets
aboutDlgInit
aboutDlgBox
dialog
retValue
setDefaultButtonStyle
pushButton
0,75.3125,0
sysButtonStyle
isPosInt
eatclicks
GlobalAlloc
GlobalLockPointer_
GlobalFree
PeekMsg_
PeekMsg_
PeekMsg_
GlobalUnlock
GlobalFree
wFlags
dwBytes
lpMsg
onOrOff
appsamp.tbk
sFromAppSampler
"Driver Switch"
asure the CD Device
turned on
checkDevice trueOrFalse
--update
`Position, Track
Tracks
4s_device, s_idle
--bypass status queries
- isn't
xtbkMCI("
-cdAudio media present","")
"Start
"End
ode","")
"play"
updateStatus
upDateStatus
","")
" <>
-- wait
messages
4updating following stuff
tracks
","")
current
b","")
checkDevice
leavePage
upDateStatus
leavePage
Driver Switch
checkDevice
Driver Switch
Driver Switch
trueOrFalse
status cdAudio media present
tbkMCI
Position
Position
Track
Tracks
Start Position
End Position
status cdAudio mode
tbkMCI
_9updateStatus
s_device
s_idle
upDateStatus
status cdAudio position
tbkMCI
Position
Position
status cdAudio number of tracks
tbkMCI
Tracks
Tracks
status cdAudio current track
tbkMCI
Track
Track
s_device
s_idle
owaveFileName
setWaveFile
oDIBFileName
setDIBFile
--close
b file
already
tbkMCI("status wavefile mode","")
c"play"
","")
B's bitmap
fa popup
tbkBitmapchk("
" &&
oDIBfileName && "alias dibFile style child
" && sysClientHandle, 1, 1)
6ate
translating
emessages
bmpHandle
translatewindowmessage
bmpButtonup
tbkMCIchk("
" &&
&& "
","",1,1)
wait","",1)
","",1)
--prompt
OpenDlg(".", "*.wav", "Choose a
B.", "
ndib", "
.bmp extensions)", "
--dismiss
they click
BMPbuttonUp
untranslateAllWindowMessages
ghtButtonUp
buttonDown
setWaveFile
setDIBFile
rightButtonUp
BMPbuttonUp
buttonDown
waveFileName
setWaveFile
DIBFileName
setDIBFile
status wavefile mode
tbkMCI
close waveFile
tbkMCI
DIBfileName
alias dibFile style child parent
tbkBitmapchk
window dibFile state show
tbkBitmapchk
status dibFile window
tbkBitmap
bmpButtonup
waveFileName
alias waveFile
tbkMCIchk
play waveFile wait
tbkMCIchk
close waveFile
tbkMCIchk
bmpButtonup
bmpHandle
rightButtonUp
setWaveFile
setDIBFile
setWaveFile
*.wav
Choose a wave file for this button.
Choose Wave File
OpenDlg
fileName
waveFileName
setDIBFile
*.dib
Choose a bitmap file for this button. (.dib or .bmp extensions)