answer "MacSUNRISE requires Hypercard 1.2 or higher!" with "QUIT"
domenu quit hypercard
end if
lock screen
set userlevel to 5
global MIN
Global MAX
global Maxauswahl
global AktAuswahl
global Zeiger
global Startzeit
put the seconds into Startzeit
put Arrow into Zeiger
get line 2 of card field Einstiegskarte
put it into MaxAuswahl
get Line 3 of card field Einstiegskarte
put it into AktAuswahl
put 1 into MIN
put 10 into MAX
unlock screen
end startup
on openStack
if number of this card is 5 then hide bkgnd btn id 131
global Locken
put true into Locken
end openStack
on closestack
lock screen
if the id of this card is not "card id 10417"
then
get the id of this card
else
put "card id 9262" into it
end if
go first
put it into card field Einstiegskarte
global MaxAuswahl
global AktAuswahl
put Maxauswahl into line 2 of card field Einstiegskarte
put AktAuswahl into line 3 of card field Einstiegskarte
end closestack
on openCard
if the hilite of bkgnd btn id 107 is true
then
show card pict
else
hide card pict
end if
end opencard
on closecard
hide card pict
end closecard
on arrowKey whichKey
if whichKey is "left" then click at the loc of bkgnd button id 9
if whichKey is "right" then click at the loc of bkgnd button id 8
end arrowKey
function clickLine
return ((the mouseV - item 2 of the rect of the target-4) div the textheight of the target) + 1
end clickLine
on domenu menu
if (menu is "New Stack..."or menu is "save a Copy..." or menu is "Protect Stack..."or menu is "delete Stack..." or menu is "Background" or menu is "Cut Card" or menu is "new card" or menu is "delete card" or menu is "Back" or menu is "Help" or Menu is "Recent" or menu is "First" or menu is "Last" or menu is "prev" or menu is "next" or menu is "find..." or menu is "quit hypercard" or menu is "paste card" or menu is "print report...") and (the short name of this stack is not "MacSunriSE.Drucken")
then
if menu is "New Stack..."or menu is "save a Copy..." or menu is "delete Stack..." or menu is "paste card" or menu is "print report..."
then
beep
end if
if menu is "Protect Stack..." or menu is "Background"
then
if the commandkey is not down or the optionkey is not down
then
answer "ooops!" with "'sorry"
else
ask "Das Passwort bittesch├╢n.."
if it is not "the commandkey"
then
answer "Passwort ist falsch!"
else
pass domenu
end if
end if
end if
if menu is "delete card" or Menu is "Cut Card"
then
beep
end if
if menu is "new card"
then
beep
end if
if menu is "Back" or Menu is "Recent"
then
beep
end if
if menu is "Help"
then
click at the loc of bkgnd btn id 161
end if
if menu is "First"
then
go first card of this background
end if
if menu is "Last"
then
go last card of this background
end if
if menu is "next"
then
click at the loc of bkgnd btn id 8
end if
if menu is "prev"
then
click at the loc of bkgnd btn id 9
end if
if menu is "find..."
then
click at the loc of bkgnd btn id 34
end if
if menu is "quit hypercard"
then
if the version < 1.2 then pass domenu
lock screen
push card
go first card
add one to card field Compact
if card field Compact > 9
then
answer "MacSunriSE uses more space than it needs." with "OK, COMPACT" or "QUIT"
if it is not "QUIT"
then
put 0 into card field Compact
unlock screen
push card
show card picture
lock screen
hide card picture
set cursor to Uhr1
domenu compact stack
pop card
unlock screen
show card picture
set the hilite of card btn s1 to true
lock screen
hide card picture
push card
go card 5
kompositaan
set cursor to Uhr1
domenu Compact stack
Kompositaaus
pop card
unlock screen
show card picture
set the hilite of card btn s2 to true
unlock screen
lock screen
hide card picture
push card
go MacSunriSE.Katakana
set cursor to Uhr1
domenu Compact stack
pop card
unlock screen
show card picture
set the hilite of card btn s3 to true
unlock screen
lock screen
hide card picture
push card
go MacSunriSE.Hiragana
set cursor to uhr1
domenu Compact stack
pop card
unlock screen
show card picture
set the hilite of card btn s4 to true
unlock screen
wait for 1 second
set the hilite of card btn s1 to false
set the hilite of card btn s2 to false
set the hilite of card btn s3 to false
set the hilite of card btn s4 to false
hide card pict
lock screen
end if
end if
pop card
pass domenu
end if
else
pass domenu
end if
end domenu
on selectChoice
put the short name of the target into thename
get the rect of the target
put item 2 of it into top
get the textheight of the target
put it into size
put ((item 2 of the clickloc)-top+size) div size into lineNumber
send (thename&linenumber) to target
end selectchoice
on Sprichwort
set cursor to Ohr
global Aussprache
lock screen
get bkgnd field id 22
put it into Welchersound
push card
if welchersound < 60
then
go MacSunriSE.sound1
fplay Aussprache
else
if welchersound < 101
then
go MacSunriSE.sound2
fplay Aussprache
else
if welchersound < 179
then
go MacSunriSE.sound3
fplay Aussprache
else
if welchersound < 252
then
go MacSunriSE.sound4
fplay Aussprache
else
if welchersound < 337
then
go MacSunriSE.sound5
fplay Aussprache
else
if welchersound < 418
then
go MacSunrise.sound6
fplay Aussprache
else
go MacSunriSE.sound7
fplay Aussprache
end if
end if
end if
end if
end if
end if
pop card
unlock screen
end Sprichwort
on EinzelAbfrageLesungen
put the short name of bkgnd field id 1 into thename
get the rect of bkgnd field id 1
put item 2 of it into top
get the textheight of bkgnd field id 1
put it into size
put ((item 2 of the clickloc)-top+size) div size into lineNumber
global Gesprochen
put 0 into gesprochen
if linenumber = 1
then
if the visible of bkgnd btn id 132 is true
then
if the hilite of bkgnd btn id 132 is true
then
global Aussprache
if the visible of bkgnd btn id 154 is true or the hilite of bkgnd btn id 162 is true
then
global Abfragebutton
get Abfragebutton
if it is 1
then
set the hilite of bkgnd btn id 47 to true
put 0 into Abfragebutton
end if
else
Sprichwort
global Gesprochen
put 1 into Gesprochen
end if
end if
end if
if the visible of bkgnd btn id 154 is true
then
set the hilite of bkgnd btn id 47 to false
Kompositaan
else
if the Hilite of bkgnd btn id 162 is true then Kompositaan
end if
if the hilite of bkgnd btn id 47 is true
then
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
send (thename&linenumber) to bkgnd field id 1
end if
exit EinzelAbfrageLesungen
end if
if the hilite of bkgnd btn id 47 is true
then
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
end if
send (thename&linenumber) to bkgnd field id 1
end EinzelAbfrageLesungen
on EinzelAbfrageBedeutungen
set cursor to watch
put the short name of bkgnd field id 20 into thename
get the rect of bkgnd field id 20
put item 2 of it into top
get the textheight of bkgnd field id 20
put it into size
put ((item 2 of the clickloc)-top+size) div size into lineNumber
if linenumber = 1
then
if the visible of bkgnd btn id 154 is true
then
set the hilite of bkgnd btn id 47 to false
Kompositaan
else
if the Hilite of bkgnd btn id 162 is true then Kompositaan
end if
if the hilite of bkgnd btn id 47 is true
then
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
send (thename&linenumber) to bkgnd field id 20
end if
exit EinzelAbfrageBedeutungen
end if
if the hilite of bkgnd btn id 47 is true
then
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
set the hilite of bkgnd btn id 47 to false
set the hilite of bkgnd btn id 47 to true
end if
send (thename&linenumber) to bkgnd field id 20
end EinzelAbfrageBedeutungen
on Kompositaan
if the visible of bkgnd btn id 176 is true
then
pop card into Banane
hide bkgnd btn id 176
end if
set the cursor to Uhr1
if the hilite of bkgnd btn id 162 is true
then
click at the loc of Bkgnd btn id 156
else
if the visible of bkgnd btn id 136 is true
then
click at the loc of bkgnd btn id 138
end if
if the hilite of bkgnd btn id 145 is not true
then
lock screen
set the cursor to Uhr2
put the short name of bkgnd btn id 147 into Startzeit
put the short name of bkgnd btn id 148 into Lernzeit
put the short name of bkgnd btn id 122 into unteregrenze
put the short name of bkgnd btn id 123 into oberegrenze
put the short name of bkgnd btn id 158 into Blättergeschw
put the hilite of bkgnd btn id 47 into AbfrageK
put the hilite of bkgnd btn id 130 into AuswahlK
put the hilite of bkgnd btn id 134 into ZufallK
put the hilite of bkgnd btn id 132 into TonK
put the visible of bkgnd btn id 140 into JISan
put the visible of bkgnd btn id 139 into KKan
set the cursor to Uhr3
put bkgnd field id 22 into AktKanJi
push card
go card 2
put bkgnd field "GemerkteZeichen" into GZ
put card field Layout into Lay
pop card
go to fifth card of MacSunriSE.Komposita
set the hilite of bkgnd btn id 130 to AuswahlK
if the hilite of bkgnd btn id 130 is true
then
click at the loc of bkgnd btn id 130
click at the loc of bkgnd btn id 130
end if
set the cursor to Uhr4
find word AktKanJi in bkgnd field id 22
Hide Bkgnd btn Hilfe
set the name of bkgnd btn id 147 to Startzeit
set the name of bkgnd btn id 148 to Lernzeit
set the name of bkgnd btn id 122 to unteregrenze
set the name of bkgnd btn id 123 to oberegrenze
set the name of bkgnd btn id 165 to Blättergeschw