home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / macsunrs.sit / MacSUNRISE.Hiragana / background_2761.txt < prev    next >
Text File  |  1990-06-26  |  15KB  |  709 lines

  1. -- background: 2761 from stack: in.Hiragana
  2. -- bmap block id: 3099
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Kana.Katakana
  6. ----- HyperTalk script -----
  7. on idle
  8.   if the mouseloc is not within the rect of bkgnd field "notiz zu Lesungen"
  9.   then
  10.   get word 1 of the short name of bkgnd btn id 136
  11.   convert it to seconds
  12.   put it into Startzeit
  13.   put the seconds into Jetztzeit
  14.   put (Jetztzeit - Startzeit) into Arbeitszeit
  15.   put trunc (Arbeitszeit / 3600) into Stunde
  16.   if Stunde < 10 then put "0"&Stunde into Stunde
  17.   put Arbeitszeit - Stunde*3600 into Arbeitszeit
  18.   put trunc (Arbeitszeit / 60) into Minute
  19.   if Minute < 10 then put "0"&Minute into Minute
  20.   put "00" into sekunde
  21.   set the name of bkgnd btn id 135 to Stunde&":"&Minute
  22.   set the name of bkgnd btn id 137 to the date
  23.   pass idle
  24. end if
  25. end idle
  26.  
  27. on arrowKey whichKey
  28.   if whichKey is "left" then click at the loc of bkgnd button "vorheriges Kanji"
  29.   if whichKey is "right" then click at the loc of bkgnd button "n├ñchstes Kanji"
  30.   select empty
  31. end arrowKey
  32.  
  33.  
  34. -- part 1 (field)
  35. -- low flags: 01
  36. -- high flags: 0004
  37. -- rect: left=187 top=42 right=253 bottom=343
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 65535
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 8192
  44. -- line height: 16
  45. -- part name: Lesungen
  46.  
  47.  
  48. -- part 6 (button)
  49. -- low flags: 00
  50. -- high flags: 6005
  51. -- rect: left=187 top=22 right=41 bottom=342
  52. -- title width / last selected line: 0
  53. -- icon id / first selected line: 0 / 0
  54. -- text alignment: 1
  55. -- font id: 0
  56. -- text size: 12
  57. -- style flags: 0
  58. -- line height: 16
  59. -- part name: Lesungen
  60. ----- HyperTalk script -----
  61. on mouseUp
  62.   if the hilite of me is false then
  63.     hide field lesungen
  64.     hide bkgnd btn voice
  65.     hide bkgnd btn ton
  66.   else
  67.     show field lesungen
  68.     show bkgnd btn voice
  69.     show bkgnd btn ton
  70.   end if
  71. end mouseUp
  72.  
  73.  
  74.  
  75. -- part 8 (button)
  76. -- low flags: 00
  77. -- high flags: 0003
  78. -- rect: left=145 top=209 right=275 bottom=178
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 22308 / 22308
  81. -- text alignment: 1
  82. -- font id: 0
  83. -- text size: 12
  84. -- style flags: 0
  85. -- line height: 16
  86. -- part name: nèchstes Kanji
  87. ----- HyperTalk script -----
  88. on mousestilldown
  89.   set the hilite of me to true
  90.   go next card of this background
  91.   set the hilite of me to false
  92.   click at 200,200
  93. end mousestilldown
  94.  
  95.  
  96.  
  97. -- part 9 (button)
  98. -- low flags: 00
  99. -- high flags: 0003
  100. -- rect: left=12 top=209 right=275 bottom=46
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 19381 / 19381
  103. -- text alignment: 1
  104. -- font id: 0
  105. -- text size: 12
  106. -- style flags: 0
  107. -- line height: 16
  108. -- part name: vorheriges Kanji
  109. ----- HyperTalk script -----
  110. on mousestilldown
  111.   set the hilite of me to true
  112.   go prev card of this background
  113.   set the hilite of me to false
  114.   click at 200,200
  115. end mousestilldown
  116.  
  117.  
  118.  
  119. -- part 15 (field)
  120. -- low flags: 00
  121. -- high flags: 0002
  122. -- rect: left=94 top=243 right=260 bottom=143
  123. -- title width / last selected line: 0
  124. -- icon id / first selected line: 0 / 0
  125. -- text alignment: 1
  126. -- font id: 3
  127. -- text size: 12
  128. -- style flags: 0
  129. -- line height: 16
  130. -- part name: JIS
  131.  
  132.  
  133. -- part 20 (field)
  134. -- low flags: 81
  135. -- high flags: 0004
  136. -- rect: left=348 top=27 right=238 bottom=505
  137. -- title width / last selected line: 0
  138. -- icon id / first selected line: 0 / 0
  139. -- text alignment: 0
  140. -- font id: 0
  141. -- text size: 12
  142. -- style flags: 8192
  143. -- line height: 16
  144. -- part name: Bedeutungen
  145. ----- HyperTalk script -----
  146. on Bedeutungen1
  147.   Zeilenfind 1
  148. end Bedeutungen1
  149.  
  150. on Bedeutungen2
  151.   Zeilenfind 2
  152. end Bedeutungen2
  153.  
  154. on Bedeutungen3
  155.   Zeilenfind 3
  156. end Bedeutungen3
  157.  
  158. on Bedeutungen4
  159.   Zeilenfind 4
  160. end Bedeutungen4
  161.  
  162. on Bedeutungen5
  163.   Zeilenfind 5
  164. end Bedeutungen5
  165.  
  166. on Bedeutungen6
  167.   Zeilenfind 6
  168. end Bedeutungen6
  169.  
  170. on Bedeutungen7
  171.   Zeilenfind 7
  172. end Bedeutungen7
  173.  
  174. on Bedeutungen8
  175.   Zeilenfind 8
  176. end Bedeutungen8
  177.  
  178. on Bedeutungen9
  179.   Zeilenfind 9
  180. end Bedeutungen9
  181.  
  182. on Bedeutungen10
  183.   Zeilenfind 10
  184. end Bedeutungen10
  185.  
  186. on Bedeutungen11
  187.   Zeilenfind 11
  188. end Bedeutungen11
  189.  
  190. on Bedeutungen12
  191.   Zeilenfind 12
  192. end Bedeutungen12
  193.  
  194. on Bedeutungen13
  195.   Zeilenfind 13
  196. end Bedeutungen13
  197.  
  198. on Zeilenfind Zeile
  199.   if the hilite of bkgnd btn "Abfrage" is true
  200.   then
  201.   get line Zeile of me
  202.   put it into Frage
  203.   if the length of frage > 20 then put char 1 to 20 of frage &" .." into frage
  204.   global Anfangszeile
  205.   global Endzeile
  206.   Zeilenanfang Zeile
  207.   Zeilenende Anfangszeile
  208.   global Ergebnis
  209.   global Antwort
  210.   put 0 into ergebnis
  211.   get line Anfangszeile to Endzeile of Bkgnd field "Lesungen"
  212.   put it into Abereich
  213.   put 1 into Wortzahl
  214.   put 0 into Z├ñhler
  215.   put 0 into newz├ñhler
  216.   put "" into newword
  217.   repeat until Abereich is empty
  218.     put newz├ñhler + 1 into newz├ñhler
  219.     repeat until chartonum of char 1 of Abereich <> 32
  220.       delete char 1 of Abereich
  221.     end repeat
  222.     repeat until chartonum of char the length of Abereich of Abereich <> 32
  223.       delete char the length of abereich of Abereich
  224.     end repeat
  225.     if offset (",",Abereich) = 0
  226.     then
  227.     do "put abereich into Antwortwort"&newz├ñhler
  228.     put "" into Abereich
  229.   else
  230.     put char 1 to offset (",",Abereich)-1 of abereich into Antwortwort
  231.     do "put Antwortwort into Antwortwort"&newz├ñhler
  232.     delete char 1 to offset (",",Abereich) of Abereich
  233.   end if
  234. end repeat
  235. put newz├ñhler into oldzahl
  236. put 0 into Z├ñhler
  237. put " " into Antwort
  238. repeat until (newz├ñhler = 0) or ( Antwort is empty )
  239.   put Z├ñhler + 1 into Z├ñhler
  240.   repeat until Antwort is empty
  241.     if newz├ñhler = 1 then Ask "Lesung f├╝r"&&Frage&&" :" with Antwort
  242.     else
  243.       Ask Z├ñhler&". von"&&oldzahl&&"Lesungen f├╝r"&&Frage&&" :" with antwort
  244.     end if
  245.     put it into Antwort
  246.     if Antwort is not empty
  247.     then
  248.     put 0 into Zahl
  249.     put 0 into ergebnis
  250.     repeat until Zahl = oldzahl
  251.       put zahl+1 into Zahl
  252.       do "put Antwortwort"&Zahl&&"into Pr├╝fantwort"
  253.       if Antwort = pr├╝fantwort
  254.       then
  255.       put Zahl into Ergebnis
  256.       put oldzahl into zahl
  257.     else
  258.       put 0 into Ergebnis
  259.     end if
  260.   end repeat
  261.   if ergebnis <> 0
  262.   then
  263.   do "put empty into Antwortwort"&Ergebnis
  264.   if the hilite of bkgnd Btn Ton is true then play Applause
  265.   put newz├ñhler-1 into newz├ñhler
  266.   put Z├ñhler +1 into Z├ñhler
  267.   if newz├ñhler <>0
  268.   then
  269.   Answer "Richtig,"&&Frage&&"heisst auch"&&antwort with "abbrechen" or "n├ñchste Bed."
  270.   if it is "abbrechen"
  271.   then
  272.   put "" into Antwort
  273. end if
  274. else
  275.   Answer "Richtig,"&&Frage&&"heisst"&&antwort with "ok"
  276.   put "" into Antwort
  277. end if
  278. end if
  279. end if
  280. end repeat
  281. end repeat
  282. end if
  283. end Zeilenfind
  284.  
  285. on ZeilenAnfang Nummer
  286.   global Anfangszeile
  287.   put 0 into Anfangszeile
  288.   if Nummer = 1
  289.   then
  290.   put 1 into Anfangszeile
  291. else
  292.   put Nummer - 1 into nummer
  293.   if line nummer of bkgnd Field "Bedeutungen" is not empty
  294.   then
  295.   Zeilenanfang nummer
  296. else
  297.   put (nummer +1) into Anfangszeile
  298. end if
  299. end if
  300. end ZeilenAnfang
  301.  
  302. on Zeilenende Nummer
  303.   global Endzeile
  304.   put 0 into Endzeile
  305.   if Nummer = 13
  306.   then
  307.   put 13 into Endzeile
  308. else
  309.   put Nummer + 1 into nummer
  310.   if line nummer of bkgnd Field "Lesungen" is not empty
  311.   then
  312.   Zeilenende nummer
  313. else
  314.   put (nummer -1) into Endzeile
  315. end if
  316. end if
  317. end Zeilenende
  318.  
  319.  
  320.  
  321.  
  322. -- part 48 (button)
  323. -- low flags: 00
  324. -- high flags: A002
  325. -- rect: left=0 top=323 right=341 bottom=70
  326. -- title width / last selected line: 0
  327. -- icon id / first selected line: 0 / 0
  328. -- text alignment: 1
  329. -- font id: 0
  330. -- text size: 12
  331. -- style flags: 0
  332. -- line height: 16
  333. -- part name: script
  334. ----- HyperTalk script -----
  335. on mouseUp
  336.   Answer "change to which script ?" with "Kanji" or "Katakana" or "Cancel"
  337.   if it is not "Cancel"
  338.   then
  339.   if it is "Kanji"
  340.   then
  341.   pop card
  342. else
  343.   put the short name of bkgnd btn id 136 into startzeit
  344.   go MacSunriSE.Katakana
  345.   set the name of bkgnd btn id 136 to startzeit
  346. end if
  347. end if
  348. end mouseUp
  349.  
  350.  
  351.  
  352. -- part 107 (button)
  353. -- low flags: 00
  354. -- high flags: 6005
  355. -- rect: left=8 top=22 right=41 bottom=173
  356. -- title width / last selected line: 0
  357. -- icon id / first selected line: 0 / 0
  358. -- text alignment: 1
  359. -- font id: 0
  360. -- text size: 12
  361. -- style flags: 0
  362. -- line height: 16
  363. -- part name:           Zeichen
  364. ----- HyperTalk script -----
  365. on mouseup
  366.   if hilite of me is false
  367.   then
  368.   hide card picture
  369. else
  370.   show card picture
  371. end if
  372. end Mouseup
  373.  
  374.  
  375.  
  376. -- part 110 (button)
  377. -- low flags: 00
  378. -- high flags: 2005
  379. -- rect: left=187 top=256 right=275 bottom=340
  380. -- title width / last selected line: 0
  381. -- icon id / first selected line: 0 / 0
  382. -- text alignment: 1
  383. -- font id: 0
  384. -- text size: 12
  385. -- style flags: 0
  386. -- line height: 16
  387. -- part name: Notiz zu Lesungen
  388. ----- HyperTalk script -----
  389. on mouseUp
  390.   if the hilite of me is false then
  391.     hide field "notiz zu Lesungen"
  392.   else
  393.     show field "notiz zu Lesungen"
  394.   end if
  395. end mouseUp
  396.  
  397.  
  398.  
  399. -- part 112 (field)
  400. -- low flags: 80
  401. -- high flags: 0007
  402. -- rect: left=187 top=276 right=320 bottom=343
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 0 / 0
  405. -- text alignment: 0
  406. -- font id: 3
  407. -- text size: 9
  408. -- style flags: 0
  409. -- line height: 12
  410. -- part name: notiz zu lesungen
  411.  
  412.  
  413. -- part 113 (field)
  414. -- low flags: 80
  415. -- high flags: 0007
  416. -- rect: left=349 top=264 right=318 bottom=505
  417. -- title width / last selected line: 0
  418. -- icon id / first selected line: 0 / 0
  419. -- text alignment: 0
  420. -- font id: 3
  421. -- text size: 9
  422. -- style flags: 8192
  423. -- line height: 12
  424. -- part name: Bedeutungenn
  425.  
  426.  
  427. -- part 125 (field)
  428. -- low flags: 80
  429. -- high flags: 0002
  430. -- rect: left=99 top=204 right=221 bottom=143
  431. -- title width / last selected line: 0
  432. -- icon id / first selected line: 0 / 0
  433. -- text alignment: 0
  434. -- font id: 3
  435. -- text size: 12
  436. -- style flags: 0
  437. -- line height: 16
  438. -- part name: EingabeEnde
  439. ----- HyperTalk script -----
  440. on mouseleave
  441.   global MAX
  442.   global MIN
  443.   get me
  444.   if it > MAX
  445.   then
  446.   set the name of bkgnd btn id 123 to MAX
  447. else
  448.   if it < the short name of bkgnd btn id 122
  449.   then
  450.   set the name of bkgnd btn id 123 to the short name of bkgnd btn id 122
  451. else
  452.   select text of me
  453.   set the name of bkgnd btn id 123 to the selectedText
  454. end if
  455. end if
  456. hide me
  457. end mouseleave
  458.  
  459.  
  460. -- part 126 (field)
  461. -- low flags: 80
  462. -- high flags: 0002
  463. -- rect: left=49 top=204 right=221 bottom=86
  464. -- title width / last selected line: 0
  465. -- icon id / first selected line: 0 / 0
  466. -- text alignment: 0
  467. -- font id: 3
  468. -- text size: 12
  469. -- style flags: 0
  470. -- line height: 16
  471. -- part name: Eingabeanfang
  472. ----- HyperTalk script -----
  473. on mouseleave
  474.   global MIN
  475.   global MAX
  476.   get me
  477.   if it < MIN
  478.   then
  479.   set the name of bkgnd btn id 122 to MIN
  480. else
  481.   if it > the short name of bkgnd btn id 123
  482.   then
  483.   set the name of bkgnd btn id 122 to the short name of bkgnd btn id 123
  484. else
  485.   select text of me
  486.   set the name of bkgnd btn id 122 to the selectedText
  487. end if
  488. end if
  489. hide me
  490. end mouseleave
  491.  
  492.  
  493.  
  494. -- part 145 (button)
  495. -- low flags: 00
  496. -- high flags: 4000
  497. -- rect: left=363 top=325 right=337 bottom=375
  498. -- title width / last selected line: 0
  499. -- icon id / first selected line: 0 / 0
  500. -- text alignment: 1
  501. -- font id: 0
  502. -- text size: 12
  503. -- style flags: 0
  504. -- line height: 16
  505. -- part name: ton
  506.  
  507.  
  508. -- part 131 (button)
  509. -- low flags: 80
  510. -- high flags: 8002
  511. -- rect: left=49 top=204 right=221 bottom=143
  512. -- title width / last selected line: 0
  513. -- icon id / first selected line: 0 / 0
  514. -- text alignment: 1
  515. -- font id: 0
  516. -- text size: 12
  517. -- style flags: 0
  518. -- line height: 16
  519. -- part name: ausgewèhlt
  520.  
  521.  
  522. -- part 132 (button)
  523. -- low flags: 00
  524. -- high flags: C002
  525. -- rect: left=350 top=323 right=341 bottom=387
  526. -- title width / last selected line: 0
  527. -- icon id / first selected line: 0 / 0
  528. -- text alignment: 1
  529. -- font id: 0
  530. -- text size: 12
  531. -- style flags: 0
  532. -- line height: 16
  533. -- part name: voice
  534.  
  535.  
  536. -- part 135 (button)
  537. -- low flags: 00
  538. -- high flags: 8000
  539. -- rect: left=272 top=4 right=20 bottom=368
  540. -- title width / last selected line: 0
  541. -- icon id / first selected line: 0 / 0
  542. -- text alignment: 1
  543. -- font id: 0
  544. -- text size: 12
  545. -- style flags: 0
  546. -- line height: 16
  547. -- part name: 00:02
  548.  
  549.  
  550. -- part 136 (button)
  551. -- low flags: 00
  552. -- high flags: 8000
  553. -- rect: left=116 top=4 right=20 bottom=169
  554. -- title width / last selected line: 0
  555. -- icon id / first selected line: 0 / 0
  556. -- text alignment: 1
  557. -- font id: 0
  558. -- text size: 12
  559. -- style flags: 0
  560. -- line height: 16
  561. -- part name: 20:21
  562.  
  563.  
  564. -- part 137 (button)
  565. -- low flags: 00
  566. -- high flags: 8000
  567. -- rect: left=348 top=3 right=19 bottom=505
  568. -- title width / last selected line: 0
  569. -- icon id / first selected line: 0 / 0
  570. -- text alignment: 1
  571. -- font id: 0
  572. -- text size: 12
  573. -- style flags: 0
  574. -- line height: 16
  575. -- part name: 21.6.1990
  576.  
  577.  
  578. -- part 138 (button)
  579. -- low flags: 00
  580. -- high flags: 0000
  581. -- rect: left=22 top=279 right=320 bottom=69
  582. -- title width / last selected line: 0
  583. -- icon id / first selected line: 30179 / 30179
  584. -- text alignment: 1
  585. -- font id: 0
  586. -- text size: 12
  587. -- style flags: 0
  588. -- line height: 16
  589. -- part name: Striche
  590. ----- HyperTalk script -----
  591. on mouseUp
  592.   set the hilite of me to true
  593.   get bkgnd field "JIS"
  594.   put it into Strichkarte
  595.   push card
  596.   lock screen
  597.   set the hilite of me to false
  598.   put the short name of bkgnd btn id 136 into startzeit
  599.   go MacSunriSE.Striche1
  600.   find word Strichkarte in bkgnd field id 22
  601.   if the result is "not found"
  602.   then
  603.   pop card
  604. else
  605.   set the name of bkgnd btn id 27 to startzeit
  606. end if
  607. click at 200,200
  608. unlock screen
  609. end mouseUp
  610.  
  611.  
  612.  
  613. -- part 139 (button)
  614. -- low flags: 00
  615. -- high flags: 0000
  616. -- rect: left=75 top=279 right=322 bottom=120
  617. -- title width / last selected line: 0
  618. -- icon id / first selected line: 8538 / 8538
  619. -- text alignment: 1
  620. -- font id: 0
  621. -- text size: 12
  622. -- style flags: 0
  623. -- line height: 16
  624. -- part name: Suchen
  625. ----- HyperTalk script -----
  626. on mouseUp
  627.   set the hilite of me to true
  628.   if the ShiftKey is down
  629.   then
  630.   set cursor to Lupe
  631.   global findwort
  632.   global suchbegriff
  633.   if suchbegriff is not empty
  634.   then
  635.   lock screen
  636.   click at the loc of bkgnd btn "n├ñchstes Kanji"
  637.   find word findwort in field Suchbegriff
  638.   click at the loc of bkgnd btn ton
  639.   click at the loc of bkgnd btn ton
  640.   unlock screen
  641.   set the hilite of me to false
  642. end if
  643. else
  644.   lock screen
  645.   push card
  646.   get the short name of bkgnd btn id 136
  647.   put it into Start
  648.   get the short name of bkgnd btn id 135
  649.   put it into Zeit
  650.   get the short name of bkgnd btn id 137
  651.   put it into datum
  652.   set the hilite of me to false
  653.   go card Suchkarte
  654.   set the name of  btn id 17 to start
  655.   set the name of  btn id 18 to zeit
  656.   set the name of  btn id 19 to datum
  657.   unlock screen
  658. end if
  659. end mouseUp
  660.  
  661.  
  662.  
  663. -- part 140 (button)
  664. -- low flags: 00
  665. -- high flags: 0000
  666. -- rect: left=129 top=279 right=321 bottom=171
  667. -- title width / last selected line: 0
  668. -- icon id / first selected line: 32670 / 32670
  669. -- text alignment: 1
  670. -- font id: 0
  671. -- text size: 12
  672. -- style flags: 0
  673. -- line height: 16
  674. -- part name: Blèttern
  675. ----- HyperTalk script -----
  676. on mouseUp
  677.   set cursor to Bl├ñttern
  678.   set the hilite of me to true
  679.   repeat until the mouse is down
  680.     lock screen
  681.     wait 20 ticks
  682.     go to next card of this background
  683.     unlock screen
  684.   end repeat
  685.   set the hilite of me to false
  686. end mouseUp
  687.  
  688.  
  689.  
  690. -- part 141 (button)
  691. -- low flags: 00
  692. -- high flags: 0000
  693. -- rect: left=448 top=323 right=342 bottom=512
  694. -- title width / last selected line: 0
  695. -- icon id / first selected line: 0 / 0
  696. -- text alignment: 1
  697. -- font id: 0
  698. -- text size: 12
  699. -- style flags: 0
  700. -- line height: 16
  701. -- part name: Beenden
  702. ----- HyperTalk script -----
  703. on mouseUp
  704.   pop card
  705.   Kompositaaus
  706.   domenu quit hypercard
  707. end mouseUp
  708.  
  709.