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

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