Birthday Greeting
Birthday Greeting
"About Birthday Card..." 
c"File" 
AboutBirthdayCard
enterBook
AboutBirthdayCard
enterBook
sizetopage
About Birthday Card...
AboutBirthdayCard
About
System
Modern
`D|D|
Modern
`D|D|
Modern
`D|D|
Modern
`D|D|
System
`D|D|
c"Edit" 
c"Text" 
c"Page" 
c"Help" 
"Open" 
"Import..." 
"Export..." 
"Print 
..." 
report..." 
"Change printer..." 
"About ToolBook..." 
Birthday Card..." 
c"File" 
AboutBirthdayCard
B"OK"
enterBook
AboutBirthdayCard
enterBook
sizetopage
Import...
Export...
Print pages...
Print report...
Change printer...
About ToolBook...
About Birthday Card...
AboutBirthdayCard
About
:PHYSSIZE
:PHYSSIZE
:PHYSSIZE
:PHYSSIZE
D"l 8bjaR
Flame2
:PHYSSIZE
Flame5
:PHYSSIZE
Flame4
:PHYSSIZE
Flame3
:PHYSSIZE
Flame1
:PHYSSIZE
Set Layer 
PaintObject Flame1 
buttonStillDown
buttonStillDown
Flame5
Flame4
Flame3
Flame2
Flame1
Animate Flame
Flame1
:PHYSSIZE
Candle
Move the 
660, 1725
945, 1695
1290, 1740
1530, 1830
1740, 1920
1890, 2070
1995, 2265
2040, 2460
1980, 2655
1845, 2730
1680, 2670
1620, 2535
1740, 2415
1920, 2325
2175, 2295
2385, 2280
2580, 2265
2700, 2250
2880, 2250
3090, 2265
3285, 2340
3525, 2415
3705, 2490
3855, 2595
3810, 2745
3705, 2850
3720, 2670
3945, 2565
4200, 2610
4485, 2730
4590, 2865
4800, 2880
4935, 2835
5100, 2790
5370, 2790
5565, 2835
5715, 2970
5775, 3045
buttonUp
buttonUp
Cake 
Move 
-3210, 2280
-2940, 2415
-2535, 2565
-1965, 2730
-1350, 2925
-795, 3105
-225, 3270
255, 3390
885, 3570
1530, 3750
2175, 3960
2505, 4065
2535, 4230
buttonUp
buttonUp
Bring in Cake
Flame1
:PHYSSIZE
:PHYSSIZE
INITSOUNDDRIVER
Animate
SetUpPage
Cake 
Move 
-3210, 2280
Candle 
-15, 2130
Match 
'Flame1 
'Flame2 
'Flame3 
'Flame4 
'Flame5 
-1050, 3450
Rectangle "Top cover" 
1500,90
Bottom 
1350,1900
Comments1
Comments2
B"Play song"
-- bring 
-2940, 2415
-2535, 2565
-1965, 2730
-1350, 2925
-795, 3105
-225, 3270
255, 3390
885, 3570
1530, 3750
2175, 3960
2505, 4065
2535, 4230
candle on 
120, 2190
345, 2310
555, 2385
870, 2490
1125, 2610
1380, 2730
1665, 2850
1995, 2985
2265, 3090
2535, 3180
2760, 3255
2970, 3330
3195, 3390
3390, 3435
3600, 3465
3840, 3480
4095, 3480
4260, 3465
4395, 3375
4545, 3270
4620, 3150
4545, 2985
4440, 2910
4320, 2895
4230, 2955
4155, 3060
4140, 3210
4110, 3405
4110, 3540
4110, 3675
4110, 3795
4110, 3870
4155, 3960
-- light 
-885, 3435
-660, 3420
-495, 3435
-360, 3420
-150, 3405
75, 3405
300, 3390
540, 3375
750, 3390
945, 3390
1125, 3390
1395, 3420
1650, 3435
1935, 3465
2175, 3495
2490, 3525
2775, 3540
2955, 3555
3090, 3555
3150, 3615
3000, 3570
2850, 3525
2625, 3495
2445, 3480
2220, 3465
2025, 3465
1785, 3465
1575, 3450
1350, 3435
1110, 3420
780, 3405
525, 3375
225, 3330
-90, 3300
-345, 3270
-585, 3270
-795, 3270
-1005, 3255
-1035, 3255
greeting
XCoord 
5800 
7600 
I,1900
comments
-- give option 
play music; don't force 
, because 
can sound awful
-- animate flame
FlameDelay -- adjust 
speed 
processor
BestLayer -- below the 
but above 
match
PaintObject 
-- The following 
 routines are 
HRoger Newhall,
-- who got them 
ToolBook Scripts Notebook 
was nice enough
take 
people how 
.drv"
CloseSound( )
CountVoiceNotes( 
GetThresholdStatus( )
OpenSound( )
SetSoundNoise( 
SetVoiceAccent( 
SetVoiceEnvelope( 
SetVoiceNote( 
SetVoiceQueueSize( 
SetVoiceSound( 
SetVoiceThreshold( 
StartSound( )
StopSound( )
SyncAllVoices( )
WaitSoundState( 
INITIALIZEVALUES
4MusicVoices, MusicAttack, MusicTempo, MusicLevel, MusicPitch
Zerr, notendx, notelen, dotcnt
e = 65535 
 Device Is Busy" 
f"OK"
%has" && 
 && "
f"OK"
 <> 0 
 Failed:" && 
f"OK"
1, 2000 )
 <> 0 
:err 
f"OK"
PlayMelody fTune 
4sMusPitch, sMusDuration, sMusDots, sMusOctave, sMusDefaults
4sMusVoices, sMusAttack, sMusTempo, sMusVolume, sMusPitchBase
4sNote
ZnTuneNotes
necessary
s <> 1 
-- setup state 
world
device
 = 65535 
 = -1 
fokay 
each 
player
PlayNote 
-- close 
, value
Znotechars 
Zpitch, inflect, octave, duration, dots 
Zbpitch, binflect, boctave, bduration, bdots 
parser 
flags 
ci <= 
 >= 32 
 <= 255 
 >= 0 
 <= 255
 >= 0 
 <= 2
a potential 
a valid 
-- a rest 
 try 
ttok type 
 = "!" 
 = "#"
 = 0 
 = 1 
 = 2 
 = 3 
 = 4 
 = 5 
 = 6 
 = 7 
-- whole 
-- half 
-- quarter 
-- eigthth 
-- sixteenth 
-- thirtysecond 
bDuration 
bDots = 
>= 0 
<= 4 
correct 
 - Windows 
H3 semitones 
 <> 0
 * 12) - 3
range 
sharp 
 <> 0 
-- PLAY THE NOTE NOW
1,5632,1000 ) 
	<> 0 
<> 0 
= 65529 
"Invalid Dot 
:" && 
= 65530 
Length: " && 
= 65531 
: " && 
-- error 
Xthese 
you like
: " * 
BirthdaySong
"tempo,255,c4q,c,d,c,f,e4w,r4q,c,c,d,c,g,f4w," &\
c5,a4,f,e,d4w,
&5,c,a4,f,g,
leavePage
INITSOUNDDRIVER
enterPage
INITIALIZEVALUES
SetUpPage
PlayMelody
PlayNote
Animate
BirthdaySong
enterPage
sizetopage
INITSOUNDDRIVER
.Animate
leavePage
SetUpPage
SetUpPage
Top cover
Bottom cover
Play song
Comments2
Comments1
Flame5
Flame4
Flame3
Flame2
Flame1
Match
Candle
Animate
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Candle
Top cover
Bottom cover
Play song
Comments2
Comments1
XCoord:by
XCoord:to
XCoord
Flame5
Flame4
Flame3
Flame2
Flame1
Match
candle
Flame5
Flame4
Flame3
Flame2
Flame1
BestLayer
FlameDelay
INITSOUNDDRIVER
sound.drv
CloseSound
CountVoiceNotes
GetThresholdStatus
OpenSound
SetSoundNoise
SetVoiceAccent
SetVoiceEnvelope
SetVoiceNote
SetVoiceQueueSize
SetVoiceSound
SetVoiceThreshold
StartSound
StopSound
SyncAllVoices
WaitSoundState
INITIALIZEVALUES
INITIALIZEVALUES
OpenSound
The Sound Device Is Busy
SetVoiceAccent
SetVoiceAccent Failed:
SetVoiceQueueSize
SetVoiceQueueSize Failed:
StopSound
CloseSound
notendx
notelen
dotcnt
MusicVoices
MusicAttack
MusicTempo
MusicLevel
MusicPitch
PlayMelody
sound.drv
CloseSound
CountVoiceNotes
GetThresholdStatus
OpenSound
SetSoundNoise
SetVoiceAccent
SetVoiceEnvelope
SetVoiceNote
SetVoiceQueueSize
SetVoiceSound
SetVoiceThreshold
StartSound
StopSound
SyncAllVoices
WaitSoundState
OpenSound
The Sound Device Is Busy
oPxPlayNote
CloseSound
nTuneNotes
sNote
sMusVoices
sMusAttack
sMusTempo
sMusVolume
sMusPitchBase
sMusPitch
sMusDuration
sMusDots
sMusOctave
sMusDefaults
fTune
PlayNote
Tempo
Volume
Attack
bDuration
bDuration
bDots
SetVoiceNote
Invalid Dot Count:
Invalid Note Length: 
Invalid Note: 
CountVoiceNotes
Notes: 
StartSound
WaitSoundState
StopSound
notendx
notelen
dotcnt
sNote
sMusVoices
sMusAttack
sMusTempo
sMusVolume
sMusPitchBase
sMusPitch
sMusDuration
sMusDots
sMusOctave
sMusDefaults
bpitch
binflect
boctave
bduration
bdots
pitch
inflect
octave
duration
notechars
value
BirthdaySong
PlayMelody
tempo,255,c4q,c,d,c,f,e4w,r4q,c,c,d,c,g,f4w,
r4q,c,c,c5,a4,f,e,d4w,r4q,c5,c,a4,f,g,f4w,r
Bottom cover
Match
Flame1
7:PHYSSIZE
Flame5
$<:PHYSSIZE
Flame4
=:PHYSSIZE
Flame3
t?:PHYSSIZE
Flame2
A:PHYSSIZE
Flame1
B:PHYSSIZE
Top cover
Candle
Comments1
Put any comments, best wishes, whatever, either down here...
Comments2
...or over here.
Or both!
About
Birthday Card
by Jack Herlocker
Based on a similar stack I wrote in HyperCard for my wife's birthday. Feel free to copy it, pass it around, personalize it, whatever.
Comments to me at CIS 72157,404
B"OK"
"About"
buttonUp
buttonUp
About
Play song
BirthdaySong
buttonDown
buttonDown
#BirthdaySong
Play "Happy Birthday"