home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / macsunrs.sit / MacSUNRISE / stack.txt < prev   
Text File  |  1990-07-20  |  13KB  |  523 lines

  1. -- stack: in
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 3 (painting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 5
  11. -- first background id: 2746
  12. -- card count: 15
  13. -- first card id: 10417
  14. -- list block id: 2951
  15. -- print block id: 7941
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 3
  19. -- free size: 54112 bytes
  20. -- total size: 196608 bytes
  21. -- stack block size: 13312 bytes
  22. -- created by hypercard version: 0x00000000
  23. -- compacted by hypercard version: 0x01258000
  24. -- modified by hypercard version: 0x01228000
  25. -- opened by hypercard version: 0x01258000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on startup
  69.   hide menubar
  70.   hide msg
  71.   if the version < 1.2
  72.   then
  73.   answer "MacSUNRISE requires Hypercard 1.2 or higher!" with "QUIT"
  74.   domenu quit hypercard
  75. end if
  76. lock screen
  77. set userlevel to 5
  78. global MIN
  79. Global MAX
  80. global Maxauswahl
  81. global AktAuswahl
  82. global Zeiger
  83. global Startzeit
  84. put the seconds into Startzeit
  85. put Arrow into Zeiger
  86. get line 2 of card field Einstiegskarte
  87. put it into MaxAuswahl
  88. get Line 3 of card field Einstiegskarte
  89. put it into AktAuswahl
  90. put 1 into MIN
  91. put 10 into MAX
  92. unlock screen
  93. end startup
  94.  
  95. on openStack
  96.   if number of this card is 5 then hide bkgnd btn id 131
  97.   global Locken
  98.   put true into Locken
  99. end openStack
  100.  
  101. on closestack
  102.   lock screen
  103.   if the id of this card is not "card id 10417"
  104.   then
  105.   get the id of this card
  106. else
  107.   put "card id 9262" into it
  108. end if
  109. go first
  110. put it into card field Einstiegskarte
  111. global MaxAuswahl
  112. global AktAuswahl
  113. put Maxauswahl into line 2 of card field Einstiegskarte
  114. put AktAuswahl into line 3 of card field Einstiegskarte
  115. end closestack
  116.  
  117. on openCard
  118.   if the hilite of bkgnd btn id 107 is true
  119.   then
  120.   show card pict
  121. else
  122.   hide card pict
  123. end if
  124. end opencard
  125.  
  126. on closecard
  127.   hide card pict
  128. end closecard
  129.  
  130. on arrowKey whichKey
  131.   if whichKey is "left" then click at the loc of bkgnd button id 9
  132.   if whichKey is "right" then click at the loc of bkgnd button id 8
  133. end arrowKey
  134.  
  135.  
  136. function clickLine
  137. return ((the mouseV - item 2 of the rect of the target-4) div the textheight of the target) + 1
  138. end clickLine
  139.  
  140. on domenu menu
  141.   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")
  142.   then
  143.   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..."
  144.   then
  145.   beep
  146. end if
  147. if menu is "Protect Stack..." or menu is "Background"
  148. then
  149. if the commandkey is not down or the optionkey is not down
  150. then
  151. answer "ooops!" with "'sorry"
  152. else
  153.   ask "Das Passwort bittesch├╢n.."
  154.   if it is not "the commandkey"
  155.   then
  156.   answer "Passwort ist falsch!"
  157. else
  158.   pass domenu
  159. end if
  160. end if
  161. end if
  162. if menu is "delete card" or Menu is "Cut Card"
  163. then
  164. beep
  165. end if
  166. if menu is "new card"
  167. then
  168. beep
  169. end if
  170. if menu is "Back" or Menu is "Recent"
  171. then
  172. beep
  173. end if
  174. if menu is "Help"
  175. then
  176. click at the loc of bkgnd btn id 161
  177. end if
  178. if menu is "First"
  179. then
  180. go first card of this background
  181. end if
  182. if menu is "Last"
  183. then
  184. go last card of this background
  185. end if
  186. if menu is "next"
  187. then
  188. click at the loc of bkgnd btn id 8
  189. end if
  190. if menu is "prev"
  191. then
  192. click at the loc of bkgnd btn id 9
  193. end if
  194. if menu is "find..."
  195. then
  196. click at the loc of bkgnd btn id 34
  197. end if
  198. if menu is "quit hypercard"
  199. then
  200. if the version < 1.2 then pass domenu
  201. lock screen
  202. push card
  203. go first card
  204. add one to card field Compact
  205. if card field Compact > 9
  206. then
  207. answer "MacSunriSE uses more space than it needs." with "OK, COMPACT" or "QUIT"
  208. if it is not "QUIT"
  209. then
  210. put 0 into card field Compact
  211. unlock screen
  212. push card
  213. show card picture
  214. lock screen
  215. hide card picture
  216. set cursor to Uhr1
  217. domenu compact stack
  218. pop card
  219. unlock screen
  220. show card picture
  221. set the hilite of card btn s1 to true
  222. lock screen
  223. hide card picture
  224. push card
  225. go card 5
  226. kompositaan
  227. set cursor to Uhr1
  228. domenu Compact stack
  229. Kompositaaus
  230. pop card
  231. unlock screen
  232. show card picture
  233. set the hilite of card btn s2 to true
  234. unlock screen
  235. lock screen
  236. hide card picture
  237. push card
  238. go MacSunriSE.Katakana
  239. set cursor to Uhr1
  240. domenu Compact stack
  241. pop card
  242. unlock screen
  243. show card picture
  244. set the hilite of card btn s3 to true
  245. unlock screen
  246. lock screen
  247. hide card picture
  248. push card
  249. go MacSunriSE.Hiragana
  250. set cursor to uhr1
  251. domenu Compact stack
  252. pop card
  253. unlock screen
  254. show card picture
  255. set the hilite of card btn s4 to true
  256. unlock screen
  257. wait for 1 second
  258. set the hilite of card btn s1 to false
  259. set the hilite of card btn s2 to false
  260. set the hilite of card btn s3 to false
  261. set the hilite of card btn s4 to false
  262. hide card pict
  263. lock screen
  264. end if
  265. end if
  266. pop card
  267. pass domenu
  268. end if
  269. else
  270.   pass domenu
  271. end if
  272. end domenu
  273.  
  274. on selectChoice
  275.   put the short name of the target into thename
  276.   get the rect of the target
  277.   put item 2 of it into top
  278.   get the textheight of the target
  279.   put it into size
  280.   put ((item 2 of the clickloc)-top+size) div size into lineNumber
  281.   send (thename&linenumber) to target
  282. end selectchoice
  283.  
  284. on Sprichwort
  285.   set cursor to Ohr
  286.   global Aussprache
  287.   lock screen
  288.   get bkgnd field id 22
  289.   put it into Welchersound
  290.   push card
  291.   if welchersound < 60
  292.   then
  293.   go MacSunriSE.sound1
  294.   fplay Aussprache
  295. else
  296.   if welchersound < 101
  297.   then
  298.   go MacSunriSE.sound2
  299.   fplay Aussprache
  300. else
  301.   if welchersound < 179
  302.   then
  303.   go MacSunriSE.sound3
  304.   fplay Aussprache
  305. else
  306.   if welchersound < 252
  307.   then
  308.   go MacSunriSE.sound4
  309.   fplay Aussprache
  310. else
  311.   if welchersound < 337
  312.   then
  313.   go MacSunriSE.sound5
  314.   fplay Aussprache
  315. else
  316.   if welchersound < 418
  317.   then
  318.   go MacSunrise.sound6
  319.   fplay Aussprache
  320. else
  321.   go MacSunriSE.sound7
  322.   fplay Aussprache
  323. end if
  324. end if
  325. end if
  326. end if
  327. end if
  328. end if
  329. pop card
  330. unlock screen
  331. end Sprichwort
  332.  
  333.  
  334. on EinzelAbfrageLesungen
  335.   put the short name of bkgnd field id 1 into thename
  336.   get the rect of bkgnd field id 1
  337.   put item 2 of it into top
  338.   get the textheight of bkgnd field id 1
  339.   put it into size
  340.   put ((item 2 of the clickloc)-top+size) div size into lineNumber
  341.   global Gesprochen
  342.   put 0 into gesprochen
  343.   if linenumber = 1
  344.   then
  345.   if the visible of bkgnd btn id 132 is true
  346.   then
  347.   if the hilite of bkgnd btn id 132 is true
  348.   then
  349.   global Aussprache
  350.   if the visible of bkgnd btn id 154 is true or the hilite of bkgnd btn id 162 is true
  351.   then
  352.   global Abfragebutton
  353.   get Abfragebutton
  354.   if it is 1
  355.   then
  356.   set the hilite of bkgnd btn id 47 to true
  357.   put 0 into Abfragebutton
  358. end if
  359. else
  360.   Sprichwort
  361.   global Gesprochen
  362.   put 1 into Gesprochen
  363. end if
  364. end if
  365. end if
  366. if the visible of bkgnd btn id 154 is true
  367. then
  368. set the hilite of bkgnd btn id 47 to false
  369. Kompositaan
  370. else
  371.   if the Hilite of bkgnd btn id 162 is true then Kompositaan
  372. end if
  373. if the hilite of bkgnd btn id 47 is true
  374. then
  375. set the hilite of bkgnd btn id 47 to false
  376. set the hilite of bkgnd btn id 47 to true
  377. set the hilite of bkgnd btn id 47 to false
  378. set the hilite of bkgnd btn id 47 to true
  379. send (thename&linenumber) to bkgnd field id 1
  380. end if
  381. exit EinzelAbfrageLesungen
  382. end if
  383. if the hilite of bkgnd btn id 47 is true
  384. then
  385. set the hilite of bkgnd btn id 47 to false
  386. set the hilite of bkgnd btn id 47 to true
  387. set the hilite of bkgnd btn id 47 to false
  388. set the hilite of bkgnd btn id 47 to true
  389. end if
  390. send (thename&linenumber) to bkgnd field id 1
  391. end EinzelAbfrageLesungen
  392.  
  393. on EinzelAbfrageBedeutungen
  394.   set cursor to watch
  395.   put the short name of bkgnd field id 20 into thename
  396.   get the rect of bkgnd field id 20
  397.   put item 2 of it into top
  398.   get the textheight of bkgnd field id 20
  399.   put it into size
  400.   put ((item 2 of the clickloc)-top+size) div size into lineNumber
  401.   if linenumber = 1
  402.   then
  403.   if the visible of bkgnd btn id 154 is true
  404.   then
  405.   set the hilite of bkgnd btn id 47 to false
  406.   Kompositaan
  407. else
  408.   if the Hilite of bkgnd btn id 162 is true then Kompositaan
  409. end if
  410. if the hilite of bkgnd btn id 47 is true
  411. then
  412. set the hilite of bkgnd btn id 47 to false
  413. set the hilite of bkgnd btn id 47 to true
  414. set the hilite of bkgnd btn id 47 to false
  415. set the hilite of bkgnd btn id 47 to true
  416. send (thename&linenumber) to bkgnd field id 20
  417. end if
  418. exit EinzelAbfrageBedeutungen
  419. end if
  420. if the hilite of bkgnd btn id 47 is true
  421. then
  422. set the hilite of bkgnd btn id 47 to false
  423. set the hilite of bkgnd btn id 47 to true
  424. set the hilite of bkgnd btn id 47 to false
  425. set the hilite of bkgnd btn id 47 to true
  426. end if
  427. send (thename&linenumber) to bkgnd field id 20
  428. end EinzelAbfrageBedeutungen
  429.  
  430. on Kompositaan
  431.   if the visible of bkgnd btn id 176 is true
  432.   then
  433.   pop card into Banane
  434.   hide bkgnd btn id 176
  435. end if
  436. set the cursor to Uhr1
  437. if the hilite of bkgnd btn id 162 is true
  438. then
  439. click at the loc of Bkgnd btn id 156
  440. else
  441.   if the visible of bkgnd btn id 136 is true
  442.   then
  443.   click at the loc of bkgnd btn id 138
  444. end if
  445. if the hilite of bkgnd btn id 145 is not true
  446. then
  447. lock screen
  448. set the cursor to Uhr2
  449. put the short name of bkgnd btn id 147 into Startzeit
  450. put the short name of bkgnd btn id 148 into Lernzeit
  451. put the short name of bkgnd btn id 122 into unteregrenze
  452. put the short name of bkgnd btn id 123 into oberegrenze
  453. put the short name of bkgnd btn id 158 into Bl├ñttergeschw
  454. put the hilite of bkgnd btn id 47 into AbfrageK
  455. put the hilite of bkgnd btn id 130 into AuswahlK
  456. put the hilite of bkgnd btn id 134 into ZufallK
  457. put the hilite of bkgnd btn id 132 into TonK
  458. put the visible of bkgnd btn id 140 into JISan
  459. put the visible of bkgnd btn id 139 into KKan
  460. set the cursor to Uhr3
  461. put bkgnd field id 22 into AktKanJi
  462. push card
  463. go card 2
  464. put bkgnd field "GemerkteZeichen" into GZ
  465. put card field Layout into Lay
  466. pop card
  467. go to fifth card of MacSunriSE.Komposita
  468. set the hilite of bkgnd btn id 130 to AuswahlK
  469. if the hilite of bkgnd btn id 130 is true
  470. then
  471. click at the loc of bkgnd btn id 130
  472. click at the loc of bkgnd btn id 130
  473. end if
  474. set the cursor to Uhr4
  475. find word AktKanJi in bkgnd field id 22
  476. Hide Bkgnd btn Hilfe
  477. set the name of bkgnd btn id 147 to Startzeit
  478. set the name of bkgnd btn  id 148 to Lernzeit
  479. set the name of bkgnd btn id 122 to unteregrenze
  480. set the name of bkgnd btn id 123 to oberegrenze
  481. set the name of bkgnd btn id 165 to Bl├ñttergeschw
  482. set the hilite of bkgnd btn Abfrage to AbfrageK
  483. set the hilite of bkgnd btn Zufall to ZufallK
  484. set the hilite of bkgnd btn Ton to TonK
  485. set the visible of bkgnd btn Abfrage to false
  486. set the visible of bkgnd btn JIS to Jisan
  487. set the Visible of bkgnd btn "K&K" to KKan
  488. push card
  489. go card 2
  490. put GZ into Bkgnd field "gemerkteZeichen"
  491. put Lay into card field Layout
  492. pop card
  493. if the visible of bkgnd btn Jis is true
  494. set the cursor to Uhr5
  495. then
  496. show Bkgnd field JIS
  497. hide Bkgnd field KK
  498. end if
  499. if the visible of bkgnd btn "K&K" is true
  500. then
  501. show Bkgnd field KK
  502. hide Bkgnd field JIS
  503. end if
  504. click at 200,200
  505. set the cursor to Uhr6
  506. else
  507.   send mouseup to bkgnd btn id 154
  508. end if
  509. global Locken
  510. if Locken is true then unlock screen
  511. end if
  512. hide msg
  513. end Kompositaan
  514.  
  515. on Kompositaaus
  516. end Kompositaaus
  517.  
  518. on Hilfe
  519.   click at the loc of bkgnd btn id 162
  520. end Hilfe
  521.  
  522.  
  523.