This is a description. Blah, blah, blah. Boy could I use another cup of Joe. Nothing is worse than work coffee.
to handle buttonup
do this
do that
description only
description and script
This is a description. Blah, blah, blah. Boy could I use another cup of Joe. Nothing is worse than work coffee. I've had so many cups of it already that I can see through time. Maybe some decaf is in orderrican butt.
Description and example
This is a description. Blah, blah, blah. Boy could I use another cup of Joe. Nothing is worse than work coffee. I've had so many cups of it already that I can see through time. Maybe some decaf is in order
to handle buttonup
do this
do that
buttonclick
buttonclick
cancel
buttonclick
buttonclick
Cancel
Untitled
description and script
{{{{{{{p{
description and script
.
Auto-scroll field
Converting to Binary, Hex, Octal
intro
<Introduction>
Dragging Objects
label
Dragging Objects
to handle buttondown loc
local stack bnds,mouseOffset
linkdll "user"
int getsystemmetrics(int)
-- check if the user has swapped mouse buttons.
if getsystemmetrics(23) >0
set leftMouseButton to keyRightButton
else
set leftMouseButton to keyLeftButton
set bnds to bounds of target
set mouseOffset to item 1 of loc - item 1 of bnds,\
item 2 of loc - item 2 of bnds
leftMouseButton=keyLeftButton
while keystate(leftMouseButton)is down
newloc = sysMousePosition
if newLoc <> loc
set position of target to \
item 1 of newLoc-item 1 of mouseOffset,\
item 2 of newLoc-item 2 of mouseOffset
set loc to newLoc
end
Put the script below in an object that you want to drag with the mouse. Note: if you want to drag a group, change the references from arget
The Format command has been extended to allow conversion between Binary, Hex, and Octal number systems. The following are the new format strings
Binary: "@b"
Octal: "@o"
Hex: "@h"
Decimal: "@d"
These strings precede the normal number format string. So to convert a variable "n" from decimal to hexidecimal, you could use the following command:
format number n as "@h0"
To convert it back to decimal, you'd do this:
format number n as "@d0"
n convertTo is "Hexidecimal"
format number numberEntered as "@h#"
else
format number numberEntered as "@o#"
end conditions
return numberEntered
end doConversion
origPage
original
Converting to Binary, Hex, Octal
label
wwwwp
wwwwp
wwwww
wwwwwp
dragApple
dragOrange
wwwwwp
SSMARQUESCR
resize
intro
SubtopicName
<Introduction>
origPage
10,14
selectChars
original
<Introduction>
label
Introduction
This book contains tips and techniques for Computer Based Training.
To go to a given topic, click a topic in the list.
To view topics related to a given category, choose the desired category.
Use the search button to search for a topic by key word.
Use the splitter bar to resize the navigation panel to the left.
Note: you can add new topics to this book by pressing F3 (to enter author mode) and using the topic buttons that appear at the lower left....tons that appear at the lower left.
CBT Clinic
3 ~ B
right
lights
.&, "
lights
right
seconds
lights
value
S" =
S" =
notifyBefore
right
B G%
<About this book>
Binary Insertion of Textline
scriptChooserDialog
3 ~ B
;STARTUP GRP
SYSTEM INI
WININI W31
SYSINI W31
SETUP HLP
NDDENB DL
Navigation
Check for State Abbreviation
Auto-scroll field
origPage
original
label
A dial is useful when you need a response from your subject that falls within a range. The dial widget sends the following messages:
startDialMove: sent when the user first clicks on the pointer
dialMove: sent constantly as the pointer is dragged
endDialMove: sent when the pointer is released
Each of these messages includes the current position of the pointer as its parameter. Use the property browser to set the range and scale.
The dial sends the DialMove message as you drag the pointer.
The field below the dial handles the dialMove message in a notify handler..dler.h..h.
myStartAngle
myendAngle
myTallTicSpacing
scaleDial
tbk_wid_name
dialPos
dialMin
dialMax
startAngle
endAngle
numTics
tallTicSpacing
tbk_wid_props
tbk_wid_values
myNumTics
mydialMin
mydialMax
myRotation
struct
structInfo
70433333333333333
805.6666666666667
10099999999999999
950ty
500t/
80199999999999999
Display
dialMove
-- picks up message that dial sends
notifybefore dialMove pos
61.00000394570204
dialMove
dialMove
enddialMove
description and example
SubtopicName
in,ms
ThreeDeeRect
bottomLine
topLine
explanation
.&, "
scrolling
rectangle
explanation
enterpage
notifyBefore
fref
"explanation"
txtOver
8= 0
Example:
in,sculpted
ThreeDeeRect
bottomLine
topLine
View Scripts
author
reader
author
rectangle
enterpage
notifybefore
author
reader
author
dotted
enterpage
notifybefore
buttonclick
buttonclick
Zstack hiddenObjects
o =
Copy objects
author
reader
enterpage
Labels
label
Labels
If you need to quiz the subject on elements in an illustration, a good method is to use dragging labels.
Each label below is a widget that automatically handles dragging. The bicycle is a paint object, with a group of transparent graphic objects on top of it. If the label is dropped on a graphic object in this group, the label sends the group a message. The group, in turn, checks to see if the name of the graphic object matches the name of the label group.
Drag the labels to the appropriate parts of the bicycle.
target group
chainRings
toptube
headTube
deraileur
gradeMe
1, #?
1, #?
target group
grade
grade
You got
showWrongAnswers
out of
buttonclick
buttonclick
grade
"You got" &&
%&& "out
" &&
:& "."
showWrongAnswers
Grade me
showAnswers
target group
showRightAnswers
buttonclick
buttonclick
showRightAnswers
Show answers
toptube
5949,3315
origLoc
label
Top tube
bottomLine
topLeft
point
topRight
headTube
5026,3315
origLoc
label
Head tube
bottomLine
topLeft
point
topRight
chainRings
3195,3315
origLoc
label
Chain rings
bottomLine
topLeft
point
topRight
Initialize
initQuiz
buttonclick
initQuiz
enterPage
-- initQuiz
handled
Hnotify handlers
buttonclick
notifyBefore
Initialize
deraileur
3195,3315
origLoc
label
Deraileur
bottomLine
topLeft
point
topRight
initQuiz
reader
author
enterPage
4073,3315
Matching quiz
label
Matching quiz
The widget below is useful for creating a matching quiz. The two fields below use the OpenScript's drag and drop commands to draw lines from one column to the other.
The widget has the userProperty answers, which is a list of numbers for each item on the left showing its corresponding match on the right. For example, if the subject matched left item 1 with right item 3 and left item 2 with right item 6, the userProperty answers would return "2,6" when queried. You can also set answers to a list, which will result in the lines being drawn to their appropriate positions..itions..
Drag and drop from left to right to match each artist with the appropriate movement.
MatchingQuiz
MatchingQuiz
tbk_wid_name
answers
tbk_wid_props
tbk_wid_values
false
"textlinefrompoint
allowDrag
BlineNum
"textlinefrompoint
beginDrag
BlineNum
endDrag
reader
author
author
enterpage
allowDrag
tlfp
textlinefrompoint(
beginDrag
lineNum
endDrag
notifyBefore
lineNum
Monet
Raphael
Picasso
Courbet
Redon
zanne
right
.&, "
"textlinefrompoint
BlineNum
edrawLine
objectDropped
false
"textlinefrompoint
targName
allowDrop
reader
author
author
enterpage
objectDropped sourceObj
tlfp
textlinefrompoint(
drawLine lineNum
allowDrop
targName
notifyBefore
lineNum
Realism
Symbolism
Post-impressionism
Classicism
Impressionism
Romanticism
Cubism
gradeMe
V, #?
FManswers
rightanswers
score
You got
studentAnswers
out of
matchingQuiz
buttonclick
buttonclick
studentAnswers
answers
"matchingQuiz"
rightanswers
5,4,6,7,1,2,3
answerCount =
(rightAnswers)
score = 0
"You got" &&
E&& "out
u& "."
Grade me
showAnswers
GManswers
matchingQuiz
buttonclick
buttonclick
answers
matchingQuiz
5,4,6,7,1,2,3
Show answers
Initialize
GManswers
matchingQuiz
buttonclick
GManswers
matchingQuiz
enterPage
-- initQuiz
handled
Hnotify handlers
buttonclick
answers
"matchingQuiz"
notifyBefore
Initialize
enterPage
reader
author
leavepage
character
paragraph
Mouse browsing
label
Mouse browsing
Often in a CBT application, you want to give the subject a chance to study. This example highlights objects as the mouse passes over them, and puts the name of the highlighted object into a field. Note that groups of objects within the main group (such as the Hawaiian islands in the lower-left), highlight as a single unit.
Note also that only named objects and groups highlight. The object representing the Great Lakes in the upper-right part of the map is not named....................ed.
Move your mouse cursor over the map to the right.
The state under the mouse pointer highlights, and the name of that state and its capital city appear in the fields below the map.
US map
Washington
Olympia
capital
Montana
Helena
capital
Oregon
Salem
capital
California
Sacramento
capital
Nevada
Carson City
capital
Idaho
Boise
capital
Salt Lake City
capital
Wyoming
Cheyenne
capital
Arizona
Phoenix
capital
New Mexico
Santa Fe
capital
Colorado
Denver
capital
Texas
Austin
capital
Oklahoma
Oklahoma City
capital
Kansas
Topeka
capital
Nebraska
Lincoln
capital
South Dakota
Pierre
capital
North Dakota
Bismarck
capital
Minnesota
St. Paul
capital
Des Moines
capital
Missouri
Jefferson City
capital
Arkansas
Little Rock
capital
Louisiana
Baton Rouge
capital
Wisconsin
Madison
capital
Illinois
Springfield
capital
Kentucky
Frankfort
capital
Indiana
Indianapolis
capital
Tennessee
Nashville
capital
Mississippi
Jackson
capital
Alabama
Montgomery
capital
Georgia
Atlanta
capital
Florida
Tallahassee
capital
North Carolina
Raleigh
capital
South Carolina
Columbia
capital
Columbus
capital
Pennsylvania
Harrisburg
capital
West Virginia
Charleston
capital
Virginia
Richmond
capital
Maryland
Annapolis
capital
Delaware
Dover
capital
New York
Albany
capital
New Jersey
Trenton
capital
Vermont
Montpelier
capital
New Hampshire
Concord
capital
Maine
&HnH}
Augusta
capital
Massachusetts
H4JBJ
Boston
capital
Connecticut
Hartford
capital
Rhode Island
Providence
capital
Alaska
Juneau
capital
Hawaii
Honolulu
capital
,2<2*
D3T3*
Michigan
Lansing
capital
state/capital display
capital
state
updateDisplay
message
sent
Hthe map
notifyBefore updateDisplay stateName,capital
state
capital
State
Capital
author
updateDisplay
Standard ToolBook messages
enterApplication
-- link needed dll's
linkDLL "tb30win.
displayBitsPerPixel()
-- these gdi calls are used
drawing separator
getDeviceCaps(
moveTo(
lineTo(
setROP2(
gcreatePen(
deleteObject(
gselectObject(
Xuser
ggetDC(
releaseDC(
e"Using
&Template" alias "helpTemplate"
fhelptext\
"Displays
4 on
template."
backcolor (a "
" handler, below) depending on
-- the
colors displayed.
numColors()
> 16
darkerBlue()
lighterBlue()
"navigationBar"
-- initialize combobox
"categories"
"<All
populate "
"Topics"
hideControls
leaveApplication
buttons
modifying
showControls
"CategoryButtons"
"Navigation"
7 - 60
deleted, updates
category array (struct[][]) userProperty
-- Each row
Bhas
a list
numbers
belonging
that
}. This
-- walks through
, finding every instance
found,
removes
"description
example,
only"
Zx[][]
categoryStruct
pageID
dimensions(x)
itemOffset(
7,x[i][2])
x[i][2]
a content
--
ensure
label property
--
holds
each
fref
"subTopicName"
--
necessary
"explanation"
--
scrollbars,
txtOver
;= 0
Utility handlers
-- returns
extractName t
tabOffset
following a
extractID t
lastTabLoc
U(t)
instances
stripChar chr,strng
hdc =
windowhandle
retval =
%,24)
212,79.1875,71.6875
180,75.125,100
backColor
value
bckgrnds
"intro,
curBack
Handlers
dealing
structure
during authoring
debugging purposes)
showCategoryStruct
Zx[][]
x[i][1]
9& x[i][2] &
handers
twoDquicksort fArray[][],n,dtype
4stbk_noSwap
twoDquicksrt
6, 1,
E),n,
U l, r,n,
r > l
x, l, ((l+r)
(l+1)
test
i][n] <
l][n]
i][n] <
l][n]
i][n] <
l][n]
stbk_noswap
, l,
-1,n,
, lst+1,r,n,
a, b
farray[a][i]
b][i]
b][i]
mydir =
sen = sysErrorNumber
se =
ss =
bref =
u&"tmplhelp.tbk")
1= ss
"Cannot
8TMPLHELP.TBK"
vref =
defaultpage
"cbt4"
r= se
pointerObj
"hand"
-- returns the
dialPos
angle
rotation
dialMin
dialMax
startAngle
endAngle
angleRange
-- sets
its proper
value
syssuspendMessages
coords
"face"
+)/2,\
radians)
angleFromPoint
(((Atan2(y-cy,x-cx)+2.5*
)/(2*
))*360)
-- handles dragging
around
dialMove
endDialMove
)/2,\
(ctr,
dstart
+360))
dend
3> 180
k360 >
k360)
numTics
syssuspendmessages
)/2,\
radius
) - (
))/2
tallTicSpacing
)/360 * (2 * PI) - (PI / 2)
<= 10
curField
curfield
500,200
centerPosition
+ ((1+sz*2) *
+ ((1+sz*2) *
)*(i/
)), \
+ ((1+sz) *
+ ((1+sz) *
myNumTics
mydialMax
dialmin
mydialMin
myTallTicSpacing
numtics
myStartAngle
myendAngle
-- General
handler.
-- Supports
single
-- Joseph Brick, Oct 93.
-- Notes about
routine:
-- ToolBook allows unrestricted values
following
. This
a fully
-- rotates these
}. All other
}are oriented along a 90 degree
-- axis.
just moves
Owithout
-- rotating their
-- A note on storing polar coordinates:
order
converts
Cartesian
-- (stored
%integers)
h (manipulated
%real numbers),
When converted
acan suffer
rounding errors
{may become more
skewed each
Iyou
To avoid
routines
-- change
shape
distance
running
option,
will have
reset the
Hsending
storePolar
-- Parameters:
-- obj:
Object
be rotated.
Can use
toolbook
{. Required.
-- ctr:
which
P. Default
structInfo[]
xangle,yangle,
,cx,cy,radAngle,MouseAngle,longestH,storedAngle
x,y,fp
Zstack v,vtemp,loc
Zgraphic curObj
myRotation
-- If
xprovided, base
b + (
b + (
a list
objlist
total
vCount
objCount
-- loop goes once
curObjType
-- If
--
kover:
objList
--
fsetable
maliable
isArcOrPie
b + (
b + (
curVCount
-- Add
{reference
--
-- walk through
current
y distances
-- find length
vector:
undefined
)x=0,y=0:
dx=0
(dx,dy)
+(dy,dx)- (rot/360)*(2*
[vcount+i][1]
array
fa row
-- Each
stores a
vertice.
,cx,cy,
x,y,fp
\ supplied
/360) * 2*
b + (
b + (
they
already
propsStored
uprops
I,ctr
section
resets
repetition specified:
--
-- adjust
Hnewangle,
x,y coorinates:
countV
curIndex
][2]+
0][1]
x(j = 1
(rd)*h
f(rd)*h
cxObj
cyObj
(rd)*h
f(rd)*h
iterate
sized
sysSuspendMessages
b(sz),
b(sz)
-- stub notify handlers,
sends
notifyAfter
enddialMove
-- returns a list
two numbers: the
followed
zpossible.
grade
ZnumRight,totalNum
objs
0 = label
-- initializes quiz
notifyBefore initQuiz
objCount
-- use
you want
store
state
answers
-- that
subject gave
Zretval
& "," &
-- restores
stored value.
labelPosition
-- moves
labels
their proper spots.
showRightAnswers
objName
objLabel
wrong
original
showWrongAnswers
origLoc
bnds
checkObject labelObj
"Correct!"
"Nope."
showing
,mode
showObjs
hideObjs
dropTarget
Zstack bnds,mouseOffset
X"user"
getsystemmetrics(
* has swapped
I buttons.
=23) >0
leftMouseButton
targ
newloc =
newLoc <>
objectFromPoint(
"base"
dropTarget
checkObject
oorigLoc
labelPosition
value
notifyBefore initQuiz
moved
-- 13,14
-- 11,12
9,10
sized
pupp
syspageunitsperpixel
pwidth
* 10
pheight
* 10
topLeft
mask
topRight
U"point"
bottomLine
sz >
sz >
syssuspendmessages
distToP
sz -
Zstack bnds,mouseOffset
X"user"
getsystemmetrics(
* has swapped
I buttons.
=23) >0
leftMouseButton
targ
newloc =
newLoc <>
objectFromPoint(
"base"
dropTarget
checkObject
oorigLoc
labelPosition
value
notifyBefore initQuiz
moved
-- 13,14
-- 11,12
9,10
sized
pupp
syspageunitsperpixel
pwidth
* 10
pheight
* 10
topLeft
mask
topRight
U"point"
bottomLine
sz >
sz >
syssuspendmessages
distToP
sz -
Zstack bnds,mouseOffset
X"user"
getsystemmetrics(
* has swapped
I buttons.
=23) >0
leftMouseButton
targ
newloc =
newLoc <>
objectFromPoint(
"base"
dropTarget
checkObject
oorigLoc
labelPosition
value
notifyBefore initQuiz
moved
-- 13,14
-- 11,12
9,10
sized
pupp
syspageunitsperpixel
pwidth
* 10
pheight
* 10
topLeft
mask
topRight
U"point"
bottomLine
sz >
sz >
syssuspendmessages
distToP
sz -
Zstack bnds,mouseOffset
X"user"
getsystemmetrics(
* has swapped
I buttons.
=23) >0
leftMouseButton
targ
newloc =
newLoc <>
objectFromPoint(
"base"
dropTarget
checkObject
oorigLoc
labelPosition
value
notifyBefore initQuiz
moved
-- 13,14
-- 11,12
9,10
sized
pupp
syspageunitsperpixel
pwidth
* 10
pheight
* 10
topLeft
mask
topRight
U"point"
bottomLine
sz >
sz >
syssuspendmessages
distToP
sz -
4s_color,s_targ
capital
updateDisplay nm,
Zlogical refresh
--
we are still
. If so, don't blank out
-- (otherwise
flashes annoyingly)
newObj
objectFromPoint(
xsent
going
,mode.
notifyBefore
state,
just a stub handler, so no error occurs
around
deal
message.
-- a
that displays
value.
nearestPUPP val,xpix
sliderPos
value
Zscale
sliderMin
sliderMax
mysliderPos
sysPageUnitsPerPixel
sliderBounds
"bar"
nearestPupp(
thumb
oldP
percentage
newP
x1 + (x2-x1-w)*
sliderMove
adjustNumbers
numTics
otallTicSpacing
numFields
// ts
j) /
2),10)
curfield
xCenter
U(i*ts)
),10)+1
&& "
invalid."
mySliderMax
&& "
mySliderMin
high
U"0"
U"0"
myTallTicSpacing
> 50
must be a
between 1
thumbwidth
U"base"
(x2 - x1) /
leftMost
curLine
curline
myNumTics
notifyBefore
endSliderMove
xpix
sysPageUnitsPerPixel
sliderMin
sliderMax
scale
sliderBounds
nearestPupp(
oldP
nearestPUPP(
pos -
oldMouseX
sliderPos
mysliderPos
startSliderMove
newMouseX
newP
b(x1,
6-dx),x2-w)
e-x1)*
)/(x2-x1-w)+
sliderMove
endSliderMove
notifyBefore
helptext
statusbar
clocktime
totalSecs =
ototalTime
-- test
Ihas changed
oldTime
curTime
coords
"face"
+)/2,\
radius
X) - (
d))/2
secsAngle
"sweep"
handVertices(
,angle,
j(.99,
") * (2 * PI) - (PI / 2))), \
j(.99,
Y) * (2 * PI) - (PI / 2))),\
f(0 - (PI / 2))),\
(0 - (PI / 2)))
myTotalTime
value
timeFormat
adjustment
"minutes"
"hours"
xa valid
myRound(
*.25)
"quarter"
*.5)
"half"
=num*.75)
"threeQuarters"
"zero"
"(" &
& ")"
zval
%".0"
%".00"
timeLimit
totaltimeLimit
clockTime
startTime
timeStart
timeGetTime()
notifyBefore
- qs)
y1000
b(0,ct)
ct <= 0
endtime
-- stub, so
nothing handles message, we don't
notifyAfter
X"mmsystem"
-- ToolBook sends
message just
4displaying
-- the dropdown
a comboBox
enterDropDown
updateDropDownList
-- puts
Fcategories
Tlist
ZmainStruct[][]
categoryStruct
arraySize
dimensions(
[i][1]
odropDownItems
"<All
N>" &
a combobox
selectChange value
selcted
-- navigation
populate "
i][1]=
amainstruct[i][2]
-- kill
, so
goes
leaveDropDown
-- adds the
navigation
-- called on
whenever
1combobox value
-- Note: each
will be
like such:
-- <label
zhangs out beyond
edge
used
populate
ZallTopics
X"tb30dlg.dll"
sortTextLines(
curPageID =
"All"
-- walk every
content backgrounds,
-- a list
their labels.
bckgrnds
"intro,description
example,
only"
backRef
pageRef
--
numbers
category
trailing
-- update
sortedText =
foundPage = 0
curID = extractID(
foundpage = i
-- adjust
oselectedTextLines =
selectedTextlines
--
U, navigate
that
clicked.
buttonclick
-- change cursor
resize
entering
default
leaving
handler resizes the
splitter
dragged
ZstartPos
X"user"
getsystemmetrics(
( has swapped mouse buttons.
>23) >0
leftMouseButton
width
navigation
minwidth
maxwidth
leftWindow
rightWindow
leftWindowWidth
clientSize
wholeWindowWidth
clientsize
leftMost
minWidth
rightMost
j(maxWidth,
splitterBounds
DC's
;windows, since we'll be drawing
-- on
hDCLeft
getDC(clientHandle
hDCright
a pen
hPen
createPen(0,2,0)
! on
;DC's, storing old selected
hOldObjectleft
selectObject(
hOldObjectMain
modes
oldROP2right
setROP2(
oldROP2left
windowRef
curDC
oldP
mousePosition
oldp <>
-- erase
drawLine
,endPos
we need
switch
DC's, release them
deleteObject(
releaseDC(
hDCleft
RightBorder
currentpage
leftwindow
syspageUnitsPerPixel
sizePage
-- draws a
specified DC
endpos
fromPoint
PageUnitsToClient(
toPoint
moveTo(
lineTo(
categories
the "prompt"
, selecting
current
Mbelongs
that
-- category. (
Ncan
more than one
myID
myTopic
label
"Choose
M" &&
ZmainStruct[][]
categoryStruct
fref
arraySize
dimensions(
si][1]
--
o i,
--
selectedTextLine
itemOffset(
i][2]) > 0
--
kunless we are on
selectedTextlines
-- update
compileCategories
selectedTextLines
-- walk through
--
) > 0
--
xalready assigned,
i][2])=0
i][2]
--
-- exists
itemLoc
i][2])
i][2]
structure
-- Displays
scripted
}on the
allowing users
their scrips
buttonclick
Zretval
sysRuntime = TRUE
"Scripts cannot be viewed
rruntime version
Multimedia ToolBook."
--
reference
appear
dlgPage
"scriptChooserDialog"
--
list
getObjectList(
currentobject
nameRef(currentObject) &
) = 1
obref
"scriptObjects"
%modal
-- display "friendly
obtype
obname
notifyBefore
4s_lheight
notifyAfter
linkStuff
fontChange
answers
sized
moved
-- getting, setting the responses
value
answerList
valCount
drawLine i,
valcount+1
-- drawing
bleftN,rightN,setProp
angLine
leftRef
rightRef
leftTLBE
textLineBeginEnd(
rightTLBE
leftX
G+ 30
leftY
rightX
J- 30
rightY
X+150,
:-150,
-- returns a list
3 numbers:
-- 1: twips
beginning
-- 2:
-- 3:
lineheight
leftmarg
relativeLine
n < 1
4-lh) * lh >
0,0,0
leftBound
leftMarg
rightbound
+stringLen(
midLine
* lh - (stringHeight()
s,rightBound,
Bunder a point
-- differs
that will only
there
actually a
textLineFromPoint mp
b) > lh * (
-scr)
tlineNum
b +lh)
b + ind
windows
stuff
linkstuff
X"gdi"
getTextExtent(
gselectObject(
deleteObject(
gcreateFont(
linkDLL "user"
ggetDC(
releaseDC(
makefont fontName,pitch,
weight
ghfont,hOldObject,hdc
sysClientHandle)
syspageunitsperpixel
fheight
((1440/
/72)) --
pixels
hFont
<,0,0,0,
,0,0,0,0,0,0,0,0,
"Failure: no logical
created."
-- kills
destroyFont
sysclientHandle,
a given
fref
makeFont
length
str,strlen
strLen
retval = (
k65536) *
"aaa",3)
y65536) *
"hideControls
helpTemplate
reader
displayBitsPerPixel
tb30win.dll
Using this &Template
false
Displays help on using this template.
categories
lighterBlue
getDC
releaseDC
Topics
numColors
darkerBlue
<All topics>
navigationBar
backcolor
Tvpopulate
getDeviceCaps
moveTo
lineTo
setROP2
,"TkNo
createPen
deleteObject
selectObject
enterApplication
helpTemplate
leaveApplication
CshowControls
author
1,!J<Y
topics
CategoryButtons
Navigation
showControls
"hideControls
reader
topics
CategoryButtons
Navigation
hideControls
itemOffset
description and script,description and example,description only
pageID
categoryStruct
categoryStruct
destroy
.&, "
subTopicName
description and script,description and example,description only
scrolling
explanation
label
enterPage
subTopicName
description and script,description and example,description only
label
topic
label
leavePage
extractName
extractID
,%H.%
itemOffset
stripChar
}releaseDC
4getDeviceCaps
getDC
retval
numColors
Q@darkerBlue
R@lighterBlue
bckgrnds
intro,description and script,description and example,description only
curBack
backColor
categoryStruct
showCategoryStruct
stbk_noSwap
|CtwoDquicksrt
twoDquicksort
stbk_noSwap
|CtwoDquicksrt
twoDquicksrt
.&, "
Cannot find book TMPLHELP.TBK
mydir
tmplhelp.tbk
helpTemplate
z% lYs
label
grade
label
initQuiz
w, #>
label
answers
,%H.%
label
!LlabelPosition
label
answers
objName
!LlabelPosition
objLabel
label
showRightAnswers
objName
objLabel
label
b;origLoc
label
showWrongAnswers
label
label
checkObject
showObjs
hideObjs
zshowObjs
author
lYhideObjs
reader
reader
zshowObjs
lYhideObjs
enterPage
false
dropTarget
b;origLoc
newloc
getsystemmetrics
getsystemmetrics
checkObject
dropTarget
buttondown
labelPosition
b;origLoc
initQuiz
c;origLoc
moved
c;origLoc
label
topLeft
topRight
c;origLoc
point
bottomLine
sized
b;origLoc
newloc
getsystemmetrics
getsystemmetrics
checkObject
dropTarget
buttondown
labelPosition
b;origLoc
initQuiz
c;origLoc
moved
c;origLoc
label
topLeft
topRight
c;origLoc
point
bottomLine
sized
b;origLoc
newloc
getsystemmetrics
getsystemmetrics
checkObject
dropTarget
buttondown
labelPosition
b;origLoc
initQuiz
c;origLoc
moved
c;origLoc
label
topLeft
topRight
c;origLoc
point
bottomLine
sized
b;origLoc
newloc
getsystemmetrics
getsystemmetrics
checkObject
dropTarget
buttondown
labelPosition
b;origLoc
initQuiz
c;origLoc
moved
c;origLoc
label
topLeft
topRight
c;origLoc
point
bottomLine
sized
s_targ
s_color
-capital
PupdateDisplay
mouseenter
newObj
s_color
s_targ
PupdateDisplay
page,background
mouseleave
s_targ
s_color
PupdateDisplay
author
updateDisplay
sliderMove
startSliderMove
sliderMax
sliderMin
nearestPUPP
mysliderPos
HendSliderMove
sliderMax
sliderBounds
sliderMin
mysliderPos
nearestPupp
sliderPos
newMouseX
oldMouseX
buttondown
startSliderMove
yhelptext
statusbar
mouseEnter
statusbar
mouseLeave
secsAngle
totalTime
kDcurTime
sweep
oldTime
handVertices
jDcurTime
coords
radius
totalSecs
clocktime
?handVertices
myTotalTime
totalTime
1, #b
1, #>
minutes
timeFormat
quarter
is not a valid time format.
seconds
threeQuarters
myTotalTime
hours
MVmyRound
totalTime
myRound
totaltimeLimit
minutes
totaltimeLimit
timeFormat
is not a valid time format.
clockTime
seconds
totalTime
totalTime
hours
timeLimit
seconds
totaltimeLimit
timeLimit
timeStart
timeGetTime
startTime
buttonstilldown
timeStart
timeStart
kDcurTime
clocktime
timeGetTime
curTime
totaltimeLimit
4endtime
endtime
timeStart
kDcurTime
clockTime
leavepage
timeGetTime
mmsystem
enterpage
HHupdateDropDownList
enterDropDown
<All topics>
categoryStruct
updateDropDownList
topics
<All topics>
Tvpopulate
categoryStruct
selectChange
leaveDropDown
.&, #>
,%H.%
.&, #>
.&+ +
bckgrnds
extractID
tb30dlg.dll
sortedText
curID
intro,description and script,description and example,description only
pageRef
curPageID
wsortTextLines
sortTextLines
backRef
label
populate
extractID
buttonclick
resize
mouseEnter
default
mouseLeave
selectObject
curDC
deleteObject
splitterBounds
endPos
getDC
hDCright
createPen
}releaseDC
splitter
hOldObjectleft
getsystemmetrics
leftWindow
oldROP2left
minwidth
rightWindow
gsizePage
-setROP2
getsystemmetrics
oldROP2right
windowRef
hOldObjectMain
hDCLeft
edrawLine
leftMost
maxwidth
wholeWindowWidth
rightMost
RightBorder
buttondown
lineTo
fromPoint
y!moveTo
toPoint
drawLine
myTopic
itemOffset
prompt
categories
Choose categories for topic
categoryStruct
label
enterPage
itemOffset
categories
itemLoc
categoryStruct
categoryStruct
compileCategories
obref
dlgPage
-nameRef
scriptObjects
scriptChooserDialog
Scripts cannot be viewed in the runtime version of Multimedia ToolBook.
currentobject
buttonclick
obtype
obname
nameRef
enterPage
s_lheight
leavepage
linkStuff
s_lheight
FManswers
GManswers
s_lheight
fontChange
fontChange
character
fontChange
paragraph
FManswers
right
GManswers
sized
FManswers
right
GManswers
moved
false
answerList
edrawLine
answers
answerList
answers
leftRef
rightRef
false
right
angLine
rightY
leftTLBE
rightTLBE
answerList
textLineBeginEnd
answerList
leftY
drawLine
lineheight
stringLen
leftBound
rightbound
midLine
/$stringHeight
textLineBeginEnd
lineheight
stringLen
textLineFromPoint
SIgetTextExtent
selectObject
deleteObject
createFont
getDC
releaseDC
linkstuff
,!JHY
selectObject
hOldObject
}releaseDC
Failure: no logical font created.
getDC
createFont
hfont
weight
makefont
.&, "
selectObject
deleteObject
hOldObject
}releaseDC
hfont
destroyFont
UdmakeFont
destroyFont
s_lheight
/$stringHeight
lineheight
UdmakeFont
destroyFont
retval
jogetTextExtent
stringLen
jogetTextExtent
stringHeight
Slider
label
Slider%
A slider is useful when you need a response from your subject that falls within a range. The slider widget sends the following messages:
startSliderMove: sent when the user first clicks on the thumb
sliderMove: sent constantly as the slider is being dragged
endSliderMove: sent when the slider stops moving.
Each of these messages includes the current position of the slider thumb as its parameter. Use the property browser to set the range and scale.
The slider sends the message endSliderMove when its thumb is set to a new position.
This message is handled by the group that displays the fish.
(Degrees Fahrenheit)
slider
mySliderMin
mySliderMax
mysliderPos
myNumTics
scaledSlider
tbk_wid_name
numTics
tallTicSpacing
sliderMin
sliderMax
sliderPos
tbk_wid_props
tbk_wid_values
myTallTicSpacing
thumb
hSliderThumb
txClassName
button id 103 of page id 15
glide
width
false
hilight
myTrackPos
Shuttle
helptext
Button
60.566666666666673
700333333333333344
80.50000000000001e-014
90066666666666669
10033333333333336
800.0000000000001
10000
Select the proper temperature for tropical aquarium.
fishy
,!JU"
,!JK"
Too hot!
problem
health
Too cold!
Just right.
endSliderMove
jmyhealth
sickfish
health
jmyhealth
health
notifyBefore endSliderMove sliderPos
>= 75
<=85
ohealth
"good"
"poor"
M < 75
"Too cold!"
"problem"
{ > 85
+hot!"
"Just
value
"fish"
"sickfish"
myhealth
sickfish
problem
Too cold!t.
Initialize
fishy
sliderPos
health
slider
initialize
initialize
buttonClick
initialize
enterpage
initialize
sliderPos
health
"fishy"
buttonClick
notifyBefore
Initialize
sliderMove
LiderMove
endSliderMove
startSliderMove
enterpage
Timer
label
Timer
Use this timer widget when you want to limit the amount of time the subject has to answer questions or view material. You can customize the total amount of time on the clock, as well as the subject's time limit.
For example, the script in the Initialize button sets the timer's total time to 60 seconds, and the time limit to 45 seconds. You can specify hours and minutes as well. Use the Property Browser to specify options.
When time is up, the timer sends the message endTime.
A notify handler in the Initialize button starts the timer running when the page is entered.
When time is up, the timer sends the endTime message, which in this example is handled by the Initialize button.
timer
QuizTimer
tbk_wid_name
totalTime
timeLimit
tbk_wid_props
tbk_wid_values
mytotalTime
curTime
totaltimeLimit
sweep
quarter
threequarters
45505
timeFormat
(Seconds)
Initialize
timer
timeLimit
45 seconds
startTime
totalTime
60 seconds
initialize
initialize
buttonClick
initialize
enterPage
Time's up.
endTime
initialize
totalTime
"timer"
timeLimit
startTime
buttonClick
notifyBefore
endTime
's up."
Initialize
leavepage
endtime
enterpage
buttonstilldown
meStart
scriptChooserDialog
.&+ +
scriptObjects
enterpage
cancel
keychar
scriptObjects
cancel
selectedtextlines
"scriptObjects"
keyEnter
editscript
close
origPage
original
scriptChooserDialog
label
&View the Selected Script:
bottomLine
topLine
scriptObjects
editScript
buttondoubleclick
editScript
selectedTextLines
-- the full
{reference
hiding
--
each
9,t)+1
U(t)
Group "state/capital display" Group id 65 of Page id 158
Group "US map" Group id 61 of Page id 158Button "gradeMe" Button id 44 of Page id 157
Field "right" Field id 2 of Page id 157
Field "left" Field id 1 of Page id 157
Group "MatchingQuiz" Group id 43 of Page id 157d 156
Button "gradeMe" Button id 7 of Page id 156
Group "target group" Group id 6 of Page id 156
buttonclick
buttonclick
View Script
cancel
buttonclick
buttonclick
Cancel
.&+ +
categories
categoryStruct
enterPage
,%H.%
extractName
frefText
extractID
categories
stwoDQuickSort
categoryStruct
updateCategories
categories
the "
ZmainStruct[][]
categoryStruct
fref
arraySize
dimensions(
ni][1]
i][2]
selectedTextlines
-- recreates structure
updateCategories
frefText
i][1]
extractName(t)
i][2]
extractID(t)
twoDQuickSort
origPage
original
label
bottomLine
topLine
Categories
Conversion help 128
Useful Functions 158,151
Widgets 160,159,157,156,141
Drag and Drop 1557,156,141
Drag and Drop 155 Drop 155141
Drag and Drop 1556,141
Drag and Drop 155 and Drop 155
Drag and Drop 155rag and Drop 155and Drop 155op 155Drag and Drop 155
Drag and Drop 155 Manipulation 132,131,130,129
Useful Functions 132,129,115
Widgets 141,140,139,140,139
Untitled bel ts 15
Useful Objects
Useful Objects 95,96
Date functions
cancel
categories
Untitled
Enter new category
buttonclick
-- prompts
qcategory
buttonclick
("Enter
f"Untitled"
"categories"
&New...
,%H.%
cancel
extractName
frefText
You already have another topic with this name.
false
categories
Enter new name for this category.
found
buttonclick
-- allows user
rename a category
buttonclick
fref
"categories"
frefText
selectedTextLines
tabLoc
("Enter
tabloc-1
found
--
asure
xalready used.
i <>
extractName(
"You
rhave another
-- update
&Rename...
w, #>
Cancel
extractName
Delete category
categories
buttonclick
a category
buttonclick
fref
"categories"
selectedTextlines
"Delete
n" &&
& extractName(t) &
& "?"
f"OK"
"Cancel"
&Delete
updateCategories
buttonclick
buttonclick
updateCategories
close
buttonclick
-- closes dialog box
buttonclick
&Cancel
Modify the selected category.
View Script
cancel
buttonclick
buttonclick
Cancel
MS Sans Serif
Mammals
House Pets
Smell Bad
categories
4,5,0
4,5,0
4,6,7,0
4,5,0
Farm Animals
Household Pets
Stinky Animals
categoryStruct
topicsPerCategory
Data Valadation
10,9,4,5,6,0,7
13,12,11
DOS Utilities
File Maintenance
16,15,14
Functions
Menus
Navigation
Programming Aids
Resources
Sorting and Searching
Useful Objects
Courier New
g"g#%~k
V-g"[
Data Valadation
76,75,80,74,71,28,73,72
78,79,103,77
DOS Utilities
84,85,81,83,86
File Maintenance
100,82,99
Functions
108,88,87
Menus
Navigation
Programming Aids
98,106,97
Resources
92,94,93
Sorting and Searching
82,107,109
Useful Objects
95,96
MS Sans Serif
'&%~k
Arial
6O*K~k
Courier New
6O*K~k
urier New
SubtopicName
script
SubtopicName
script
Menus
Navigation
Sorting and Searching
130,82,109
String Manipulation
132,131,130,129
Useful Functions
132,129,115
Widgets
141,140,139,138
Useful Objects
95,96
MS Sans Serif
System
Sans Serif
Sans Serif
Arial
r]g"=
r]g"=
Conversion help
Useful Functions
158,151
Widgets
160,159,157,156,141
Drag and Drop
ata Validation
Date functions
Debugging
DOS Utilities
File Maintenance
Navigation
Sorting and Searching
String Manipulation
Useful Functions
158,151
Widgets
160,159,157,156,141
Drag and Drop
Arial
Arial
r]g"=
System
Calling Windows Functions
Conversion help
Data Validation
Date functions
Debugging
DOS Utilities
File Maintenance
Navigation
Sorting and Searching
String Manipulation
Useful Functions
Widgets
40,139
Arial
Conversion help
Useful Functions
158,151
Widgets
160,159,157,156,141
Drag and Drop
Widgets
160,159,157,156,141
Drag and Drop
Debugging
DOS Utilities
File Maintenance
Navigation
Sorting and Searching
String Manipulation
Useful Functions
158,151
Widgets
159,157,156,141
Drag and Drop
Page id 143
D array"
navigationBar
Page id 1
categoryPicker
Page id 3
categoryMaintenance
Page id 8
Category Maintenance
newTopic
Page id 121
New Topic
scriptChooserDialog
CBT Tips
Topic Categories
description and script
tline
SubtopicName
in,ms
ThreeDeeRect
bottomLine
topLine
script
false
keydown
.&, "
script
scrolling
rectangle
enterpage
key,isShift,isCtrl
caretLocation
notifyBefore
fref
txtOver
8= 0
Script:
script
buttonclick
-- puts the contents
lipboard
buttonclick
fref
Copy Script
in,ms
ThreeDeeRect
bottomLine
topLine
explanation
.&, "
scrolling
rectangle
explanation
enterpage
notifyBefore
fref
"explanation"
txtOver
8= 0
enterpage
Dragging objects into bins
label
Dragging objects into bins
This example shows an effective use of custom icons and OpenScript's drag and drop commands. When you start dragging an apple or orange, the object is hidden and the cursor is changed to the appropriate shape.
Drag the apples and oranges into their respective baskets.
oranges
orange
targetType
apples
apple
targetType
Apples
Oranges
New pile
pile o fruit
buttonclick
pile o fruit
enterPage
buttonclick
"pile o fruit"
notifyBefore
Restore pile
pile o fruit
buttondown
beginDrag
targetType
objectType
You missed the basket!
You're mixing apples and oranges!
endDrag
drag
>silently
beginDrag
endDrag destObj
targetType
"You missed the basket!"
S <> objectType
>'re mixing apples
oranges!"
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
orange
objectType
apple
objectType
$ 4 Y
orange
objectType
B R Y
apple
objectType
` p Y
orange
objectType
apple
objectType
orange
objectType
enterPage
&File
&Open... Ctrl+O
&Save Ctrl+S
Save &As...
saveas
&Run...
E&xit Alt+F4
&Edit
&Undo Ctrl+Z
Cu&t Ctrl+X
&Copy Ctrl+C
&Paste Ctrl+V
paste
A&uthor F3
author
&Help
&Contents F1
index
Navigation
rightBounds
sizeStuff
splitter
sizePage
sizePage
xpix
sysPageUnitsPerPixel
rightBounds
B"splitter"
"sizeStuff"
-- keep
focuswindow
origPage
original
Navigation
label
Choose a category:
Topics of this category:::
sizeStuff
categories
<All topics>elpsFunctions
<All topics>
Conversion help
Drag and Drop
Useful Functions
Widgetsand Drop
Useful Functions
Widgetsbugging
DOS Utilities
Drag and Drop
File Maintenance
Navigation
Sorting and Searching
String Manipulation
Useful Functions
Widgetsul Objectsns
Useful Objects
navButtons
.&+ +
extractID
topics
tcount
buttonclick
buttonclick
fref
asure
isn't empty
tcount
selectedTextLines
beginning
--
-- navigate
extractID(
, so focuswindow reverts
previous
.&+ +
extractID
topics
buttonclick
-- navigates
buttonclick
fref
asure there
selectedTextLines
going
--
--
extractID(
y, so focusWindow reverts
search
,%H.%
cancel
bckgrnds
description and script,description and example,description only
searchPhrase
<Custom search>
No instances of
categories
found.
topics
Enter key word to search for.
explanation
backRef
Tvpopulate
buttonclick
buttonclick
Zfoundlist
("Enter key
searchPhrase
ZallTopics
bckgrnds
"description
example,
only"
backRef
pref
"explanation"
) = 0
"No instances
" &&
populate
combobox "categories"
"<Custom
topics
<Introduction> 145
Converting to Binary, Hex, Octal 128
Dial 141
Dragging Objects 151
Dragging objects into bins 155
Labels 156
Matching quiz 157
Mouse browsing 158
Slider 159
Timer 160
Untitled 166
categoryButtons
CategorySetup
categoryPicker
buttonclick
buttonclick
"categoryPicker"
%modal
Topic Categories
CategoryMaintenance
categoryMaintenance
buttonclick
buttonclick
"categoryMaintenance"
%modal
Category Maintenance
categories
newTopic
<All Topics>
buttonup
newTopic
%modal
combobox "categories" = "<All Topics>"
selectchange "<
New topic
w, #>
.&, "
Cancel
categories
Cannot delete the last page of this background.
label
Delete topic
buttonclick
buttonclick
"Delete
M" &&
& label
& "?"
f"OK"
"Cancel"
"Cannot delete the
selectchange
combobox "categories"
Delete topic
splitter
origPage
original
label
origPage
original
label
bottomLine
topLine
categories
Arrays
Calling Windows Functions
Conversion help
Data Validation
Date functions
Debugging
DOS Utilities
File Maintenance
Navigation
Sorting and Searching
String Manipulation
Useful Functions
Widgets
Drag and Dropul Objectsns
Useful Objects
prompt
Choose categories for topic "Dial"""rowsing"s into bins"rive""