home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / organiza / ref.sit / HyperReferencer / background_3682.txt < prev    next >
Encoding:
Text File  |  1988-07-20  |  16.7 KB  |  720 lines

  1. -- background: 3682 from stack: in
  2. -- bmap block id: 4718
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=91 top=88 right=126 bottom=444
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 20
  16. -- text size: 14
  17. -- style flags: 0
  18. -- line height: 18
  19. -- part name: author
  20. ----- HyperTalk script -----
  21. on closefield
  22.   get background field year of this card
  23.   if it is empty then
  24.     put "[]" into background field ref
  25.   else
  26.     generatereference
  27.   end if
  28. end closefield
  29.  
  30.  
  31. -- part 2 (field)
  32. -- low flags: 00
  33. -- high flags: 0000
  34. -- rect: left=82 top=44 right=82 bottom=417
  35. -- title width / last selected line: 0
  36. -- icon id / first selected line: 0 / 0
  37. -- text alignment: 0
  38. -- font id: 3
  39. -- text size: 10
  40. -- style flags: 0
  41. -- line height: 13
  42. -- part name: title
  43.  
  44.  
  45. -- part 3 (field)
  46. -- low flags: 00
  47. -- high flags: 0000
  48. -- rect: left=106 top=130 right=239 bottom=444
  49. -- title width / last selected line: 0
  50. -- icon id / first selected line: 0 / 0
  51. -- text alignment: 0
  52. -- font id: 20
  53. -- text size: 14
  54. -- style flags: 0
  55. -- line height: 18
  56. -- part name: buzz
  57. ----- HyperTalk script -----
  58. On OpenField
  59.   global ClickCount,PreviousLoc
  60.   add 1 to ClickCount
  61.   if (ClickCount >= 2) and (the clickloc is PreviousLoc) then
  62.     put 0 into ClickCount
  63.     put (item 2 of the clickloc) - (item 2 of the rect of the target) into difference
  64.     put (difference div textheight of the target)+1 into BuzzwordNumber
  65.     put line buzzwordNumber of bkgnd field buzz into buzzword
  66.     FindBuzzword buzzword
  67.   end if
  68.   put the clickloc into PreviousLoc
  69. end OpenField
  70.  
  71.  
  72.  
  73. -- part 4 (field)
  74. -- low flags: 00
  75. -- high flags: 0000
  76. -- rect: left=105 top=240 right=274 bottom=444
  77. -- title width / last selected line: 0
  78. -- icon id / first selected line: 0 / 0
  79. -- text alignment: 0
  80. -- font id: 20
  81. -- text size: 14
  82. -- style flags: 512
  83. -- line height: 18
  84. -- part name: publisher
  85.  
  86.  
  87. -- part 5 (field)
  88. -- low flags: 00
  89. -- high flags: 0000
  90. -- rect: left=86 top=275 right=295 bottom=268
  91. -- title width / last selected line: 0
  92. -- icon id / first selected line: 0 / 0
  93. -- text alignment: 0
  94. -- font id: 20
  95. -- text size: 12
  96. -- style flags: 0
  97. -- line height: 16
  98. -- part name: year
  99. ----- HyperTalk script -----
  100. on closefield
  101.   get background field author of this card
  102.   if it is empty then
  103.     put "[]" into background field ref
  104.   else
  105.     generatereference
  106.   end if
  107. end closefield
  108.  
  109.  
  110. -- part 6 (field)
  111. -- low flags: 00
  112. -- high flags: 0000
  113. -- rect: left=286 top=275 right=295 bottom=444
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 0
  117. -- font id: 20
  118. -- text size: 12
  119. -- style flags: 0
  120. -- line height: 16
  121. -- part name: ref
  122.  
  123.  
  124. -- part 7 (button)
  125. -- low flags: 00
  126. -- high flags: 8000
  127. -- rect: left=457 top=137 right=189 bottom=507
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 32670 / 32670
  130. -- text alignment: 1
  131. -- font id: 0
  132. -- text size: 12
  133. -- style flags: 0
  134. -- line height: 16
  135. -- part name: View
  136. ----- HyperTalk script -----
  137. on mouseUp
  138.   show all cards
  139. end mouseUp
  140.  
  141.  
  142.  
  143. -- part 8 (button)
  144. -- low flags: 00
  145. -- high flags: 0000
  146. -- rect: left=63 top=312 right=342 bottom=109
  147. -- title width / last selected line: 0
  148. -- icon id / first selected line: 20098 / 20098
  149. -- text alignment: 1
  150. -- font id: 0
  151. -- text size: 12
  152. -- style flags: 0
  153. -- line height: 16
  154. -- part name: Home
  155. ----- HyperTalk script -----
  156. on mouseUp
  157.   visual effect iris close
  158.   go home
  159. end mouseUp
  160.  
  161.  
  162.  
  163. -- part 9 (button)
  164. -- low flags: 00
  165. -- high flags: 8000
  166. -- rect: left=457 top=36 right=83 bottom=511
  167. -- title width / last selected line: 0
  168. -- icon id / first selected line: 21049 / 21049
  169. -- text alignment: 1
  170. -- font id: 0
  171. -- text size: 12
  172. -- style flags: 0
  173. -- line height: 16
  174. -- part name: Delete Card
  175. ----- HyperTalk script -----
  176. on mouseUp
  177.   answer "Are you sure?" with "Yes" or "No"
  178.   if it is "yes" then
  179.     get the number of cards
  180.     if it is 1 then
  181.       answer "Can't delete last card - use Delete Stack"
  182.     else
  183.       set lockscreen to true
  184.       put field abstractlink into linkid
  185.       if linkid is not 0 then
  186.         push card
  187.         go to stack "Abstracts"
  188.         go linkid
  189.         get the Id of this card
  190.         if it is LinkId then
  191.           send "DoMenu Delete Card" to HyperCard  -- Abstract stack
  192.         end if
  193.         pop card
  194.       end if
  195.       send "DoMenu Delete Card" to HyperCard     -- References stack
  196.     end if
  197.     numbercard
  198.     set lockscreen to false
  199.   end if
  200. end mouseUp
  201.  
  202.  
  203.  
  204. -- part 10 (button)
  205. -- low flags: 00
  206. -- high flags: 8000
  207. -- rect: left=457 top=88 right=134 bottom=507
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 3430 / 3430
  210. -- text alignment: 1
  211. -- font id: 0
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: New Card
  216. ----- HyperTalk script -----
  217. on mouseUp
  218.   set lockscreen to true
  219.   DoMenu New Card
  220.   put 0 into field AbstractLink
  221.   DoMenu New Button
  222.   set the rect of card button 1 to 426,61,444,79
  223.   set the style of card button 1 to checkbox
  224.   set autoHilite of card button 1 to true
  225.   choose browse tool
  226.   set lockscreen to false
  227. end mouseUp
  228.  
  229.  
  230.  
  231. -- part 11 (button)
  232. -- low flags: 00
  233. -- high flags: 0000
  234. -- rect: left=204 top=310 right=341 bottom=238
  235. -- title width / last selected line: 0
  236. -- icon id / first selected line: 1014 / 1014
  237. -- text alignment: 1
  238. -- font id: 0
  239. -- text size: 12
  240. -- style flags: 0
  241. -- line height: 16
  242. -- part name: Prev
  243. ----- HyperTalk script -----
  244. on mouseUp
  245.   doMenu Prev
  246. end mouseUp
  247.  
  248.  
  249.  
  250. -- part 12 (button)
  251. -- low flags: 00
  252. -- high flags: 0000
  253. -- rect: left=277 top=310 right=341 bottom=311
  254. -- title width / last selected line: 0
  255. -- icon id / first selected line: 1013 / 1013
  256. -- text alignment: 1
  257. -- font id: 0
  258. -- text size: 12
  259. -- style flags: 0
  260. -- line height: 16
  261. -- part name: Prev
  262. ----- HyperTalk script -----
  263. on mouseUp
  264.   go to next card
  265. end mouseUp
  266.  
  267.  
  268.  
  269. -- part 13 (button)
  270. -- low flags: 00
  271. -- high flags: 8000
  272. -- rect: left=457 top=192 right=242 bottom=507
  273. -- title width / last selected line: 0
  274. -- icon id / first selected line: 20186 / 20186
  275. -- text alignment: 1
  276. -- font id: 0
  277. -- text size: 12
  278. -- style flags: 0
  279. -- line height: 16
  280. -- part name: Sort
  281. ----- HyperTalk script -----
  282. on mouseUp
  283.   answer "Sort all cards of this stack according to:" with "Title" or "Author"
  284.   if it is "Author" then
  285.     sort by first line of field author of background
  286.   else
  287.     if it is "Title" then
  288.       sort by first line of field title of background
  289.     end if
  290.   end if
  291. end mouseUp
  292.  
  293.  
  294.  
  295. -- part 15 (button)
  296. -- low flags: 00
  297. -- high flags: 0000
  298. -- rect: left=458 top=295 right=336 bottom=507
  299. -- title width / last selected line: 0
  300. -- icon id / first selected line: 301 / 301
  301. -- text alignment: 1
  302. -- font id: 0
  303. -- text size: 12
  304. -- style flags: 0
  305. -- line height: 16
  306. -- part name: squeeze
  307. ----- HyperTalk script -----
  308. on MouseDown
  309.   set icon of bkgnd button squeeze to 303
  310. end MouseDown
  311.  
  312. on MouseLeave
  313.   set icon of bkgnd button squeeze to 301
  314. end MouseLeave
  315.  
  316. on mouseUp
  317.   push card
  318.   set lockScreen to true
  319.   DoMenu compact stack
  320.   go to stack "Abstracts"
  321.   DoMenu compact stack
  322.   pop card
  323.   set lockScreen to false
  324.   set icon of bkgnd button squeeze to 301
  325. end mouseUp
  326.  
  327.  
  328.  
  329. -- part 17 (field)
  330. -- low flags: 01
  331. -- high flags: 0000
  332. -- rect: left=418 top=44 right=62 bottom=446
  333. -- title width / last selected line: 0
  334. -- icon id / first selected line: 0 / 0
  335. -- text alignment: 65535
  336. -- font id: 20
  337. -- text size: 10
  338. -- style flags: 0
  339. -- line height: 13
  340. -- part name: nrCards
  341.  
  342.  
  343. -- part 18 (button)
  344. -- low flags: 00
  345. -- high flags: 0000
  346. -- rect: left=415 top=309 right=341 bottom=454
  347. -- title width / last selected line: 0
  348. -- icon id / first selected line: 1012 / 1012
  349. -- text alignment: 1
  350. -- font id: 0
  351. -- text size: 12
  352. -- style flags: 0
  353. -- line height: 16
  354. -- part name: First
  355. ----- HyperTalk script -----
  356. on mouseUp
  357.   visual effect dissolve
  358.   pop card
  359. end mouseUp
  360.  
  361.  
  362.  
  363. -- part 19 (button)
  364. -- low flags: 00
  365. -- high flags: 0000
  366. -- rect: left=10 top=305 right=340 bottom=42
  367. -- title width / last selected line: 0
  368. -- icon id / first selected line: 1006 / 1006
  369. -- text alignment: 1
  370. -- font id: 0
  371. -- text size: 12
  372. -- style flags: 0
  373. -- line height: 16
  374. -- part name: Quit
  375. ----- HyperTalk script -----
  376. on mouseUp
  377.   DoMenu Quit Hypercard
  378. end mouseUp
  379.  
  380.  
  381.  
  382. -- part 22 (button)
  383. -- low flags: 00
  384. -- high flags: 8000
  385. -- rect: left=9 top=256 right=302 bottom=43
  386. -- title width / last selected line: 0
  387. -- icon id / first selected line: 1020 / 1020
  388. -- text alignment: 1
  389. -- font id: 0
  390. -- text size: 12
  391. -- style flags: 0
  392. -- line height: 16
  393. -- part name: Help
  394. ----- HyperTalk script -----
  395. on mouseUp
  396.   push card
  397.   visual effect iris open
  398.   go to stack "Reference Help"
  399. end mouseUp
  400.  
  401.  
  402.  
  403.  
  404. -- part 36 (button)
  405. -- low flags: 00
  406. -- high flags: 0000
  407. -- rect: left=10 top=33 right=73 bottom=51
  408. -- title width / last selected line: 0
  409. -- icon id / first selected line: 14486 / 14486
  410. -- text alignment: 1
  411. -- font id: 0
  412. -- text size: 12
  413. -- style flags: 0
  414. -- line height: 16
  415. -- part name: Abstract Button
  416. ----- HyperTalk script -----
  417. on mouseUp
  418.   global absSize
  419.   put line 1 of field title into theTitle
  420.   if theTitle is empty then
  421.     answer "Please fill in the title" with "OK"
  422.     exit mouseup
  423.   end if
  424.   push card
  425.   set lockscreen to true
  426.   put field abstractlink into LinkId
  427.   go to stack "Abstracts"
  428.   if LinkId is 0 then
  429.     DoMenu New Card
  430.     get the size of stack "Abstracts"
  431.     put it into absSize
  432.     put the id of this card into LinkId
  433.     pop card
  434.     put LinkId into field abstractlink
  435.     push card
  436.     go to stack "Abstracts"
  437.   end if
  438.   go LinkId
  439.   -- now check that we are at the right card, in case AbstracLink has
  440.   -- become corrupted or the target abstract card has been deleted
  441.   get the Id of this card
  442.   if not (it is LinkId) then
  443.     -- If it has been, then create a new card, put it's Id into
  444.     -- AbstractLink and proceed as usual
  445.     DoMenu New Card
  446.     get the size of stack "Abstracts"
  447.     put it into absSize
  448.     put the id of this card into LinkId
  449.     pop card
  450.     put LinkId into field abstractlink
  451.     push card
  452.     go to stack "Abstracts"
  453.     go LinkId
  454.   end if
  455.   put TheTitle into field title
  456.   put "Abstract" into field DisplayType
  457.   show field abstract
  458.   show background button "Show Comment"
  459.   set lockscreen to false
  460. end mouseUp
  461.  
  462.  
  463.  
  464.  
  465. -- part 38 (button)
  466. -- low flags: 00
  467. -- high flags: 0000
  468. -- rect: left=11 top=77 right=113 bottom=51
  469. -- title width / last selected line: 0
  470. -- icon id / first selected line: 11266 / 11266
  471. -- text alignment: 1
  472. -- font id: 0
  473. -- text size: 12
  474. -- style flags: 0
  475. -- line height: 16
  476. -- part name: comment
  477. ----- HyperTalk script -----
  478.  
  479. on mouseUp
  480.   put line 1 of field title into theTitle
  481.   if theTitle is empty then
  482.     answer "Please fill in the title" with "OK"
  483.     exit mouseup
  484.   end if
  485.   push card
  486.   set lockscreen to true
  487.   put field abstractlink into LinkId
  488.   go to stack "Abstracts"
  489.   if LinkId is 0 then
  490.     DoMenu New Card
  491.     get the size of stack "Abstracts"
  492.     put it into absSize
  493.     put the id of this card into LinkId
  494.     pop card
  495.     put LinkId into field abstractlink
  496.     push card
  497.     go to stack "Abstracts"
  498.   end if
  499.   go LinkId
  500.   get the Id of this card
  501.   if not (it is LinkId) then
  502.     -- If it has been, then create a new card, put it's Id into
  503.     -- AbstractLink and proceed as usual
  504.     DoMenu New Card
  505.     get the size of stack "Abstracts"
  506.     put it into absSize
  507.     put the id of this card into LinkId
  508.     pop card
  509.     put LinkId into field abstractlink
  510.     push card
  511.     go to stack "Abstracts"
  512.     go LinkId
  513.   end if
  514.   put TheTitle into field title
  515.   put "Comment" into field DisplayType
  516.   show field comment
  517.   show background button "Show Abstract"
  518.   set lockscreen to false
  519. end mouseUp
  520.  
  521.  
  522.  
  523.  
  524. -- part 40 (button)
  525. -- low flags: 00
  526. -- high flags: 0000
  527. -- rect: left=239 top=14 right=36 bottom=261
  528. -- title width / last selected line: 0
  529. -- icon id / first selected line: 26635 / 26635
  530. -- text alignment: 1
  531. -- font id: 0
  532. -- text size: 12
  533. -- style flags: 0
  534. -- line height: 16
  535. -- part name: About ...
  536. ----- HyperTalk script -----
  537. on mouseUp
  538.   global totalSize
  539.   --  put empty into field aboutField
  540.   --  put "HyperReferencer" into line 2 of field aboutField
  541.   --  put "Version 1.3" into line 3 of field aboutField
  542.   --  put "by Frank & Oliver" into line 4 of field aboutField
  543.   --
  544.   --  put "If you find this stack useful" into line 6 of field aboutField
  545.   --  put "please send stacks filled with" into line 7 of field aboutField
  546.   --  put "references for work in Graphics or Data Security" into line 8 of field aboutField
  547.   --  put "to" into line 9 of field aboutField
  548.   --  put "Frank : FMODWYER@cs.tcd.ie" into line 10 of field aboutField
  549.   --  put "Oliver : OMULLARNEY@cs.tcd.ie" into line 11 of field aboutField
  550.   hide bkgnd button "about ..."
  551.   show field aboutField
  552.   show bkgnd button "Frank"
  553.   show bkgnd button "Oliver"
  554. end mouseUp
  555.  
  556.  
  557. -- part 41 (field)
  558. -- low flags: 81
  559. -- high flags: 0004
  560. -- rect: left=104 top=15 right=230 bottom=420
  561. -- title width / last selected line: 0
  562. -- icon id / first selected line: 0 / 0
  563. -- text alignment: 1
  564. -- font id: 20
  565. -- text size: 12
  566. -- style flags: 256
  567. -- line height: 16
  568. -- part name: aboutField
  569. ----- HyperTalk script -----
  570. on mouseDown
  571.   hide bkgnd button "Frank"
  572.   hide bkgnd button "Oliver"
  573.   hide field aboutField
  574.   show background button "About ..."
  575. end mouseDown
  576.  
  577.  
  578.  
  579.  
  580. -- part 42 (field)
  581. -- low flags: 80
  582. -- high flags: 0000
  583. -- rect: left=156 top=120 right=205 bottom=356
  584. -- title width / last selected line: 0
  585. -- icon id / first selected line: 0 / 0
  586. -- text alignment: 0
  587. -- font id: 3
  588. -- text size: 12
  589. -- style flags: 0
  590. -- line height: 16
  591. -- part name: AbstractLink
  592.  
  593.  
  594. -- part 47 (button)
  595. -- low flags: 00
  596. -- high flags: 8000
  597. -- rect: left=457 top=244 right=291 bottom=506
  598. -- title width / last selected line: 0
  599. -- icon id / first selected line: 1004 / 1004
  600. -- text alignment: 1
  601. -- font id: 0
  602. -- text size: 12
  603. -- style flags: 0
  604. -- line height: 16
  605. -- part name: write
  606. ----- HyperTalk script -----
  607. on mouseUp
  608.   push card
  609.   ask "File Name?" with "Ref Print"
  610.   put it into filename
  611.   if filename is not empty then
  612.     answer "Do you want to include the abstracts?" with "Cancel" or "No" or "Yes"
  613.     if it is "cancel" then exit MouseUp
  614.     put it into WantsAbstracts
  615.     answer "Write all cards, or only marked ones?" with "Cancel" or "Only some" or "All"
  616.     if it is "cancel" then exit MouseUp
  617.     put it into WriteAll
  618.     open file filename
  619.     put 1 into MyCard
  620.     set lockscreen to true
  621.     go to card 1
  622.     repeat
  623.       if MyCard > (number of last card) then
  624.         exit repeat
  625.       end if
  626.       if WriteAll is "Only some" then
  627.         if hilite of card button 1 is true then
  628.           put "Yes" into it
  629.         else
  630.           put "No" into it
  631.         end if
  632.       else
  633.         put "Yes" into it
  634.       end if
  635.       if it is "Yes" then
  636.         put line 1 of bkgnd field ref of this card into ThisRef
  637.         put line 1 of bkgnd field title of this card into ThisTitle
  638.         put line 1 of bkgnd field author of this card into ThisAuthor
  639.         put line 1 of bkgnd field publisher of this card into ThisPublisher
  640.         put line 1 of bkgnd field year of this card into ThisYear
  641.         write Thisref & "  " & quote & ThisTitle & quote & ", " & ThisAuthor & ", " & ThisPublisher & ", " & ThisYear & return & return to file filename
  642.         if WantsAbstracts is "Yes" then
  643.           push card
  644.           put field abstractlink into linkid
  645.           if linkid is not 0 then
  646.             set lockscreen to true
  647.             go to stack "abstracts"
  648.             go linkid
  649.             put field abstract into TheAbstract
  650.             write return & TheAbstract & return & return to file filename
  651.           end if
  652.           pop card
  653.         end if
  654.       end if
  655.       go to next card
  656.       add 1 to MyCard
  657.     end repeat
  658.     close file filename
  659.     if writeall is "Only Some" then
  660.       answer "Unmark the marked cards?" with "no" or "yes"
  661.       if it is "Yes" then
  662.         go to card 1
  663.         repeat
  664.           set hilite of card button 1 to false
  665.           go to next card
  666.           get number of this card
  667.           if it is 1 then exit repeat
  668.         end repeat
  669.       end if
  670.     end if
  671.   end if
  672.   pop card
  673.   set lockscreen to false
  674. end mouseUp
  675.  
  676.  
  677.  
  678. -- part 48 (button)
  679. -- low flags: 80
  680. -- high flags: 8004
  681. -- rect: left=130 top=29 right=79 bottom=176
  682. -- title width / last selected line: 0
  683. -- icon id / first selected line: 30634 / 30634
  684. -- text alignment: 1
  685. -- font id: 0
  686. -- text size: 12
  687. -- style flags: 0
  688. -- line height: 16
  689. -- part name: Frank
  690. ----- HyperTalk script -----
  691. on mouseUp
  692.   hide bkgnd button "Frank"
  693.   hide bkgnd button "Oliver"
  694.   hide field aboutField
  695.   show background button "About ..."
  696. end mouseUp
  697.  
  698.  
  699.  
  700. -- part 49 (button)
  701. -- low flags: 80
  702. -- high flags: 8004
  703. -- rect: left=345 top=29 right=79 bottom=391
  704. -- title width / last selected line: 0
  705. -- icon id / first selected line: 291 / 291
  706. -- text alignment: 1
  707. -- font id: 0
  708. -- text size: 12
  709. -- style flags: 0
  710. -- line height: 16
  711. -- part name: Oliver
  712. ----- HyperTalk script -----
  713. on mouseUp
  714.   hide bkgnd button "Frank"
  715.   hide bkgnd button "Oliver"
  716.   hide field aboutField
  717.   show background button "About ..."
  718. end mouseUp
  719.  
  720.