home *** CD-ROM | disk | FTP | other *** search
/ The Electronic Whole Earth Catalog / ElectronicWholeEarthCatalog.img / CRAFT / background_4934.txt < prev    next >
Text File  |  1989-02-07  |  23KB  |  1,023 lines

  1. -- background: 4934 from stack: in
  2. -- bmap block id: 54849
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Access
  6. ----- HyperTalk script -----
  7. -- bg Access script  2/7/89
  8. on initAccUpdate
  9.   -- called by 'openStack' in stack script
  10.   -- open access update and update index files
  11.   loadAccUpdate "EWEC Update", "EWEC.update", "ewec.update.index"
  12. end initAccUpdate
  13.  
  14. on exitAccUpdate
  15.   -- called by 'closeStack' in stack script
  16.   closeAccUpdate
  17. end exitAccUpdate
  18.  
  19. on openCard
  20.   doAccUpdate
  21.   pass openCard
  22. end openCard
  23.  
  24. -- access update routines
  25.  
  26. -- all these routines require the accUpdate XFCN
  27. -- doAccUpdate requires pullTabbedChunk XFCN (or function)
  28.  
  29. on doAccUpdate
  30.   -- if an access update file has been opened, this function
  31.   -- checks for an update to this card and updates fields accordingly
  32.  
  33.   global tabbedData  -- used by pullTabbedChunk function
  34.   global updHandle
  35.  
  36.   if updHandle is not 0 then
  37.     if field surveyAccession is empty
  38.     then get lookupUpdate( field "accession" )
  39.   else get lookupUpdate( field "surveyAccession" )
  40.  
  41.   if it is not empty then
  42.     lock screen
  43.     put "x" into field beenUpdated
  44.     put it into tabbedData
  45.     put pullTabbedChunk() into field "theTitle"
  46.     put pullTabbedChunk() into field "theSubTitle"
  47.     put pullTabbedChunk() into field "vendorName"
  48.     put pullTabbedChunk() into field "vendorAddr1"
  49.     put pullTabbedChunk() into field "vendorPhone"
  50.     put tabbedData into field "theAccess"
  51.     unlock screen
  52.   end if
  53. end if
  54. end doAccUpdate
  55.  
  56. function lookupUpdate theAccession
  57. global updHandle
  58.  
  59. return accUpdate( 2, updHandle, theAccession )
  60. end lookupUpdate
  61.  
  62. on loadAccUpdate diskName, dataFileName, indexFileName
  63.   -- loads a prebuilt access index file, opens data file
  64.   -- looks in HyperCard directory as well as the named disk
  65.   global updHandle
  66.   global stacks -- list of stack folders from home stack
  67.  
  68.   -- look in HC directory first, it's probably a hard disk
  69.   put accUpdate( 4, indexFileName, dataFileName ) into updHandle
  70.   if updHandle = 0 then
  71.     -- not found, so look in named disk
  72.     put accUpdate( 4, diskName & ":" & indexFileName, diskName & ":" & dataFileName ) into updHandle
  73.  
  74.     -- disabled search of "stacks" folder list
  75.     -- reenable by removing "AND false" clause
  76.     if updHandle = 0 AND false then
  77.       -- still not found, look thru folder list from home stack
  78.       if stacks is empty then
  79.         getHomeInfo  -- Std. Home stack script that fills in global variables
  80.       end if
  81.       put 1 into lineNum
  82.       put the number of lines of stacks into lc
  83.       repeat while updHandle = 0 and lineNum <= lc
  84.         put lc - lineNum
  85.         put line lineNum of stacks into diskName
  86.         put accUpdate( 4, diskName & indexFileName, diskName & dataFileName ) into updHandle
  87.         put diskName & indexFileName
  88.         add 1 to lineNum
  89.       end repeat
  90.     end if
  91.   end if
  92. end loadAccUpdate
  93.  
  94. on closeAccUpdate
  95.   global updHandle
  96.  
  97.   get accUpdate( 3, updHandle )
  98.   put 0 into updHandle
  99. end closeAccUpdate
  100.  
  101.  
  102. -- ****  end of access update scripts  ****
  103.  
  104.  
  105. -- access update build scripts (not used in product )
  106. on updPrepare fName
  107.   -- builds access update index from text file
  108.   global updHandle
  109.   put accUpdate( 1, fName ) into updHandle
  110. end updPrepare
  111.  
  112.  
  113. on updWrite theAccession
  114.   -- writes access update index to a file that loadAccUpdate can read
  115.   global updHandle
  116.  
  117.   put "ewec.update.index" into fileName
  118.   -- open and close the file, just to be sure it exists
  119.   open file fileName
  120.   close file fileName
  121.  
  122.   return accUpdate( 5, updHandle, fileName )
  123. end updWrite
  124.  
  125. -- ****  end of access update build scripts  ****
  126.  
  127.  
  128.  
  129. -- part 4 (field)
  130. -- low flags: 01
  131. -- high flags: 0000
  132. -- rect: left=34 top=85 right=313 bottom=210
  133. -- title width / last selected line: 0
  134. -- icon id / first selected line: 0 / 0
  135. -- text alignment: 0
  136. -- font id: 3
  137. -- text size: 10
  138. -- style flags: 0
  139. -- line height: 13
  140. -- part name: theAccess
  141.  
  142.  
  143. -- part 5 (field)
  144. -- low flags: 01
  145. -- high flags: 0000
  146. -- rect: left=354 top=318 right=338 bottom=456
  147. -- title width / last selected line: 0
  148. -- icon id / first selected line: 0 / 0
  149. -- text alignment: 1
  150. -- font id: 3
  151. -- text size: 9
  152. -- style flags: 0
  153. -- line height: 15
  154. -- part name: thePage
  155.  
  156.  
  157. -- part 6 (field)
  158. -- low flags: 81
  159. -- high flags: 4002
  160. -- rect: left=255 top=0 right=18 bottom=396
  161. -- title width / last selected line: 0
  162. -- icon id / first selected line: 0 / 0
  163. -- text alignment: 0
  164. -- font id: 3
  165. -- text size: 12
  166. -- style flags: 0
  167. -- line height: 16
  168. -- part name: theIdent
  169.  
  170.  
  171. -- part 18 (button)
  172. -- low flags: 00
  173. -- high flags: 0000
  174. -- rect: left=463 top=139 right=173 bottom=508
  175. -- title width / last selected line: 0
  176. -- icon id / first selected line: 0 / 0
  177. -- text alignment: 1
  178. -- font id: 0
  179. -- text size: 12
  180. -- style flags: 0
  181. -- line height: 16
  182. -- part name: Map
  183. ----- HyperTalk script -----
  184. on mouseUp
  185.   doArticleMapButton
  186. end mouseUp
  187.  
  188.  
  189.  
  190. -- part 20 (field)
  191. -- low flags: 01
  192. -- high flags: 2000
  193. -- rect: left=28 top=40 right=64 bottom=463
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 0
  197. -- font id: 3
  198. -- text size: 14
  199. -- style flags: 768
  200. -- line height: 18
  201. -- part name: theTitle
  202.  
  203.  
  204. -- part 22 (field)
  205. -- low flags: 01
  206. -- high flags: 0002
  207. -- rect: left=345 top=22 right=41 bottom=463
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 0 / 0
  210. -- text alignment: 1
  211. -- font id: 0
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: theHeading
  216. ----- HyperTalk script -----
  217. on mouseDown
  218.   popMenuArticle
  219. end mouseDown
  220.  
  221.  
  222.  
  223. -- part 25 (button)
  224. -- low flags: 00
  225. -- high flags: 0000
  226. -- rect: left=463 top=88 right=130 bottom=507
  227. -- title width / last selected line: 0
  228. -- icon id / first selected line: 0 / 0
  229. -- text alignment: 1
  230. -- font id: 0
  231. -- text size: 12
  232. -- style flags: 0
  233. -- line height: 16
  234. -- part name: Earth
  235. ----- HyperTalk script -----
  236. on mouseUp
  237.   goWholeEarth
  238. end mouseUp
  239.  
  240.  
  241.  
  242. -- part 29 (field)
  243. -- low flags: 81
  244. -- high flags: 0002
  245. -- rect: left=0 top=172 right=232 bottom=165
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 0
  249. -- font id: 3
  250. -- text size: 10
  251. -- style flags: 0
  252. -- line height: 13
  253. -- part name: Popup
  254.  
  255.  
  256. -- part 30 (field)
  257. -- low flags: 81
  258. -- high flags: 0002
  259. -- rect: left=0 top=0 right=18 bottom=86
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 0
  263. -- font id: 3
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: Accession
  268.  
  269.  
  270. -- part 32 (field)
  271. -- low flags: 01
  272. -- high flags: 2000
  273. -- rect: left=28 top=59 right=81 bottom=463
  274. -- title width / last selected line: 0
  275. -- icon id / first selected line: 0 / 0
  276. -- text alignment: 0
  277. -- font id: 3
  278. -- text size: 12
  279. -- style flags: 256
  280. -- line height: 16
  281. -- part name: theSubtitle
  282.  
  283.  
  284. -- part 33 (field)
  285. -- low flags: 81
  286. -- high flags: 0002
  287. -- rect: left=170 top=0 right=18 bottom=256
  288. -- title width / last selected line: 0
  289. -- icon id / first selected line: 0 / 0
  290. -- text alignment: 0
  291. -- font id: 3
  292. -- text size: 12
  293. -- style flags: 0
  294. -- line height: 16
  295. -- part name: SurveyAccession
  296.  
  297.  
  298. -- part 36 (field)
  299. -- low flags: 81
  300. -- high flags: 0002
  301. -- rect: left=245 top=18 right=36 bottom=361
  302. -- title width / last selected line: 0
  303. -- icon id / first selected line: 0 / 0
  304. -- text alignment: 0
  305. -- font id: 3
  306. -- text size: 12
  307. -- style flags: 0
  308. -- line height: 16
  309. -- part name: ISBN
  310.  
  311.  
  312. -- part 37 (field)
  313. -- low flags: 83
  314. -- high flags: 0002
  315. -- rect: left=373 top=14 right=63 bottom=509
  316. -- title width / last selected line: 0
  317. -- icon id / first selected line: 0 / 0
  318. -- text alignment: 0
  319. -- font id: 3
  320. -- text size: 9
  321. -- style flags: 0
  322. -- line height: 11
  323. -- part name: keyWords
  324.  
  325.  
  326. -- part 40 (field)
  327. -- low flags: 81
  328. -- high flags: 0002
  329. -- rect: left=307 top=61 right=87 bottom=497
  330. -- title width / last selected line: 0
  331. -- icon id / first selected line: 0 / 0
  332. -- text alignment: 0
  333. -- font id: 3
  334. -- text size: 9
  335. -- style flags: 0
  336. -- line height: 12
  337. -- part name: longTitle
  338.  
  339.  
  340. -- part 42 (field)
  341. -- low flags: 83
  342. -- high flags: 0002
  343. -- rect: left=307 top=86 right=113 bottom=504
  344. -- title width / last selected line: 0
  345. -- icon id / first selected line: 0 / 0
  346. -- text alignment: 0
  347. -- font id: 3
  348. -- text size: 9
  349. -- style flags: 0
  350. -- line height: 11
  351. -- part name: authorName
  352.  
  353.  
  354. -- part 43 (field)
  355. -- low flags: 83
  356. -- high flags: 0002
  357. -- rect: left=307 top=112 right=127 bottom=503
  358. -- title width / last selected line: 0
  359. -- icon id / first selected line: 0 / 0
  360. -- text alignment: 0
  361. -- font id: 3
  362. -- text size: 9
  363. -- style flags: 0
  364. -- line height: 11
  365. -- part name: authorIndexed
  366.  
  367.  
  368. -- part 45 (field)
  369. -- low flags: 83
  370. -- high flags: 0002
  371. -- rect: left=307 top=123 right=152 bottom=399
  372. -- title width / last selected line: 0
  373. -- icon id / first selected line: 0 / 0
  374. -- text alignment: 0
  375. -- font id: 3
  376. -- text size: 9
  377. -- style flags: 0
  378. -- line height: 11
  379. -- part name: pubYear
  380.  
  381.  
  382. -- part 47 (field)
  383. -- low flags: 83
  384. -- high flags: 0002
  385. -- rect: left=443 top=127 right=145 bottom=512
  386. -- title width / last selected line: 0
  387. -- icon id / first selected line: 0 / 0
  388. -- text alignment: 0
  389. -- font id: 3
  390. -- text size: 9
  391. -- style flags: 0
  392. -- line height: 11
  393. -- part name: pages
  394.  
  395.  
  396. -- part 49 (field)
  397. -- low flags: 83
  398. -- high flags: 0002
  399. -- rect: left=307 top=152 right=189 bottom=454
  400. -- title width / last selected line: 0
  401. -- icon id / first selected line: 0 / 0
  402. -- text alignment: 0
  403. -- font id: 3
  404. -- text size: 9
  405. -- style flags: 0
  406. -- line height: 11
  407. -- part name: price
  408.  
  409.  
  410. -- part 51 (field)
  411. -- low flags: 83
  412. -- high flags: 0002
  413. -- rect: left=433 top=144 right=191 bottom=499
  414. -- title width / last selected line: 0
  415. -- icon id / first selected line: 0 / 0
  416. -- text alignment: 0
  417. -- font id: 3
  418. -- text size: 9
  419. -- style flags: 0
  420. -- line height: 11
  421. -- part name: ppd$
  422.  
  423.  
  424. -- part 53 (field)
  425. -- low flags: 83
  426. -- high flags: 0002
  427. -- rect: left=307 top=185 right=219 bottom=510
  428. -- title width / last selected line: 0
  429. -- icon id / first selected line: 0 / 0
  430. -- text alignment: 0
  431. -- font id: 3
  432. -- text size: 9
  433. -- style flags: 0
  434. -- line height: 11
  435. -- part name: vendorName
  436.  
  437.  
  438. -- part 55 (field)
  439. -- low flags: 83
  440. -- high flags: 0002
  441. -- rect: left=309 top=204 right=250 bottom=512
  442. -- title width / last selected line: 0
  443. -- icon id / first selected line: 0 / 0
  444. -- text alignment: 0
  445. -- font id: 3
  446. -- text size: 9
  447. -- style flags: 0
  448. -- line height: 11
  449. -- part name: vendorAddr1
  450.  
  451.  
  452. -- part 57 (field)
  453. -- low flags: 83
  454. -- high flags: 0002
  455. -- rect: left=309 top=248 right=275 bottom=501
  456. -- title width / last selected line: 0
  457. -- icon id / first selected line: 0 / 0
  458. -- text alignment: 0
  459. -- font id: 3
  460. -- text size: 9
  461. -- style flags: 0
  462. -- line height: 11
  463. -- part name: vendorPhone
  464.  
  465.  
  466. -- part 58 (field)
  467. -- low flags: 83
  468. -- high flags: 0002
  469. -- rect: left=310 top=266 right=282 bottom=487
  470. -- title width / last selected line: 0
  471. -- icon id / first selected line: 0 / 0
  472. -- text alignment: 0
  473. -- font id: 3
  474. -- text size: 9
  475. -- style flags: 0
  476. -- line height: 11
  477. -- part name: originatorName
  478.  
  479.  
  480. -- part 59 (field)
  481. -- low flags: 83
  482. -- high flags: 0002
  483. -- rect: left=310 top=282 right=298 bottom=486
  484. -- title width / last selected line: 0
  485. -- icon id / first selected line: 0 / 0
  486. -- text alignment: 0
  487. -- font id: 3
  488. -- text size: 9
  489. -- style flags: 0
  490. -- line height: 11
  491. -- part name: reviewerName
  492.  
  493.  
  494. -- part 60 (field)
  495. -- low flags: 83
  496. -- high flags: 0002
  497. -- rect: left=310 top=298 right=314 bottom=346
  498. -- title width / last selected line: 0
  499. -- icon id / first selected line: 0 / 0
  500. -- text alignment: 0
  501. -- font id: 3
  502. -- text size: 9
  503. -- style flags: 0
  504. -- line height: 11
  505. -- part name: book
  506.  
  507.  
  508. -- part 61 (field)
  509. -- low flags: 83
  510. -- high flags: 0002
  511. -- rect: left=348 top=298 right=314 bottom=384
  512. -- title width / last selected line: 0
  513. -- icon id / first selected line: 0 / 0
  514. -- text alignment: 0
  515. -- font id: 3
  516. -- text size: 9
  517. -- style flags: 0
  518. -- line height: 11
  519. -- part name: bookPage
  520.  
  521.  
  522. -- part 62 (field)
  523. -- low flags: 83
  524. -- high flags: 0002
  525. -- rect: left=386 top=298 right=314 bottom=422
  526. -- title width / last selected line: 0
  527. -- icon id / first selected line: 0 / 0
  528. -- text alignment: 0
  529. -- font id: 3
  530. -- text size: 9
  531. -- style flags: 0
  532. -- line height: 11
  533. -- part name: articleType
  534.  
  535.  
  536. -- part 63 (field)
  537. -- low flags: 83
  538. -- high flags: 0002
  539. -- rect: left=425 top=298 right=313 bottom=511
  540. -- title width / last selected line: 0
  541. -- icon id / first selected line: 0 / 0
  542. -- text alignment: 0
  543. -- font id: 3
  544. -- text size: 9
  545. -- style flags: 0
  546. -- line height: 11
  547. -- part name: domain
  548.  
  549.  
  550. -- part 64 (field)
  551. -- low flags: 83
  552. -- high flags: 0002
  553. -- rect: left=316 top=327 right=340 bottom=331
  554. -- title width / last selected line: 0
  555. -- icon id / first selected line: 0 / 0
  556. -- text alignment: 0
  557. -- font id: 4
  558. -- text size: 12
  559. -- style flags: 256
  560. -- line height: 13
  561. -- part name: WEA?
  562.  
  563.  
  564. -- part 67 (field)
  565. -- low flags: 83
  566. -- high flags: 0002
  567. -- rect: left=33 top=271 right=308 bottom=289
  568. -- title width / last selected line: 0
  569. -- icon id / first selected line: 0 / 0
  570. -- text alignment: 0
  571. -- font id: 3
  572. -- text size: 9
  573. -- style flags: 0
  574. -- line height: 11
  575. -- part name: misc
  576.  
  577.  
  578. -- part 71 (button)
  579. -- low flags: 00
  580. -- high flags: 0000
  581. -- rect: left=463 top=232 right=275 bottom=488
  582. -- title width / last selected line: 0
  583. -- icon id / first selected line: 0 / 0
  584. -- text alignment: 1
  585. -- font id: 0
  586. -- text size: 12
  587. -- style flags: 0
  588. -- line height: 16
  589. -- part name: Left
  590. ----- HyperTalk script -----
  591. on mouseUp
  592.   doArticleLeftButton
  593. end mouseUp
  594.  
  595.  
  596.  
  597. -- part 72 (button)
  598. -- low flags: 00
  599. -- high flags: 0000
  600. -- rect: left=482 top=184 right=230 bottom=507
  601. -- title width / last selected line: 0
  602. -- icon id / first selected line: 0 / 0
  603. -- text alignment: 1
  604. -- font id: 0
  605. -- text size: 12
  606. -- style flags: 0
  607. -- line height: 16
  608. -- part name: Right
  609. ----- HyperTalk script -----
  610. on mouseUp
  611.   doArticleRightButton
  612. end mouseUp
  613.  
  614.  
  615.  
  616. -- part 73 (button)
  617. -- low flags: 00
  618. -- high flags: 0000
  619. -- rect: left=353 top=317 right=338 bottom=386
  620. -- title width / last selected line: 0
  621. -- icon id / first selected line: 1014 / 1014
  622. -- text alignment: 1
  623. -- font id: 0
  624. -- text size: 12
  625. -- style flags: 0
  626. -- line height: 16
  627. -- part name: Up
  628. ----- HyperTalk script -----
  629. on mouseUp
  630.   doArticleUpButton
  631. end mouseUp
  632.  
  633.  
  634.  
  635. -- part 74 (button)
  636. -- low flags: 00
  637. -- high flags: 0000
  638. -- rect: left=423 top=317 right=338 bottom=453
  639. -- title width / last selected line: 0
  640. -- icon id / first selected line: 1013 / 1013
  641. -- text alignment: 1
  642. -- font id: 0
  643. -- text size: 12
  644. -- style flags: 0
  645. -- line height: 16
  646. -- part name: Down
  647. ----- HyperTalk script -----
  648. on mouseUp
  649.   doArticleDownButton
  650. end mouseUp
  651.  
  652.  
  653.  
  654. -- part 75 (button)
  655. -- low flags: 80
  656. -- high flags: A003
  657. -- rect: left=4 top=313 right=328 bottom=79
  658. -- title width / last selected line: 0
  659. -- icon id / first selected line: 0 / 0
  660. -- text alignment: 1
  661. -- font id: 0
  662. -- text size: 12
  663. -- style flags: 0
  664. -- line height: 16
  665. -- part name: Show Pic
  666. ----- HyperTalk script -----
  667. on mouseUp
  668.   show Card picture
  669. end mouseUp
  670.  
  671.  
  672.  
  673. -- part 76 (button)
  674. -- low flags: 80
  675. -- high flags: A003
  676. -- rect: left=4 top=327 right=342 bottom=77
  677. -- title width / last selected line: 0
  678. -- icon id / first selected line: 0 / 0
  679. -- text alignment: 1
  680. -- font id: 0
  681. -- text size: 12
  682. -- style flags: 0
  683. -- line height: 16
  684. -- part name: Hide Pic
  685. ----- HyperTalk script -----
  686. on mouseUp
  687.   hide Card picture
  688. end mouseUp
  689.  
  690.  
  691.  
  692. -- part 79 (field)
  693. -- low flags: 81
  694. -- high flags: 0002
  695. -- rect: left=230 top=312 right=342 bottom=303
  696. -- title width / last selected line: 0
  697. -- icon id / first selected line: 0 / 0
  698. -- text alignment: 0
  699. -- font id: 3
  700. -- text size: 12
  701. -- style flags: 0
  702. -- line height: 16
  703. -- part name: publicityphone
  704.  
  705.  
  706. -- part 80 (field)
  707. -- low flags: 81
  708. -- high flags: 0002
  709. -- rect: left=73 top=85 right=117 bottom=237
  710. -- title width / last selected line: 0
  711. -- icon id / first selected line: 0 / 0
  712. -- text alignment: 0
  713. -- font id: 3
  714. -- text size: 10
  715. -- style flags: 256
  716. -- line height: 13
  717. -- part name: RealSubtitle
  718.  
  719.  
  720. -- part 85 (field)
  721. -- low flags: 81
  722. -- high flags: 0002
  723. -- rect: left=410 top=128 right=143 bottom=512
  724. -- title width / last selected line: 0
  725. -- icon id / first selected line: 0 / 0
  726. -- text alignment: 0
  727. -- font id: 4
  728. -- text size: 9
  729. -- style flags: 0
  730. -- line height: 12
  731. -- part name: MapDest
  732.  
  733.  
  734. -- part 86 (field)
  735. -- low flags: 81
  736. -- high flags: 0002
  737. -- rect: left=410 top=272 right=287 bottom=512
  738. -- title width / last selected line: 0
  739. -- icon id / first selected line: 0 / 0
  740. -- text alignment: 0
  741. -- font id: 4
  742. -- text size: 9
  743. -- style flags: 0
  744. -- line height: 12
  745. -- part name: LeftDest
  746.  
  747.  
  748. -- part 87 (field)
  749. -- low flags: 81
  750. -- high flags: 0002
  751. -- rect: left=410 top=225 right=240 bottom=512
  752. -- title width / last selected line: 0
  753. -- icon id / first selected line: 0 / 0
  754. -- text alignment: 0
  755. -- font id: 4
  756. -- text size: 9
  757. -- style flags: 0
  758. -- line height: 12
  759. -- part name: RightDest
  760.  
  761.  
  762. -- part 88 (field)
  763. -- low flags: 81
  764. -- high flags: 0002
  765. -- rect: left=354 top=285 right=300 bottom=456
  766. -- title width / last selected line: 0
  767. -- icon id / first selected line: 0 / 0
  768. -- text alignment: 0
  769. -- font id: 4
  770. -- text size: 9
  771. -- style flags: 0
  772. -- line height: 12
  773. -- part name: UpDest
  774.  
  775.  
  776. -- part 89 (field)
  777. -- low flags: 81
  778. -- high flags: 0002
  779. -- rect: left=354 top=301 right=316 bottom=456
  780. -- title width / last selected line: 0
  781. -- icon id / first selected line: 0 / 0
  782. -- text alignment: 0
  783. -- font id: 4
  784. -- text size: 9
  785. -- style flags: 0
  786. -- line height: 12
  787. -- part name: DownDest
  788.  
  789.  
  790. -- part 90 (field)
  791. -- low flags: 81
  792. -- high flags: 0002
  793. -- rect: left=163 top=172 right=232 bottom=277
  794. -- title width / last selected line: 0
  795. -- icon id / first selected line: 0 / 0
  796. -- text alignment: 0
  797. -- font id: 3
  798. -- text size: 10
  799. -- style flags: 0
  800. -- line height: 13
  801. -- part name: PopupDest
  802.  
  803.  
  804. -- part 92 (button)
  805. -- low flags: 80
  806. -- high flags: A003
  807. -- rect: left=79 top=312 right=327 bottom=223
  808. -- title width / last selected line: 0
  809. -- icon id / first selected line: 0 / 0
  810. -- text alignment: 1
  811. -- font id: 0
  812. -- text size: 12
  813. -- style flags: 0
  814. -- line height: 16
  815. -- part name: Show Fields
  816. ----- HyperTalk script -----
  817. on mouseUp
  818.   lock screen
  819.   show bg field "ISBN"
  820.   show bg field "keywords"
  821.   show bg field "longtitle"
  822.   show bg field "realsubtitle"
  823.   show bg field "authorname"
  824.   show bg field "authorindexed"
  825.   show bg field "pubyear"
  826.   show bg field "pages"
  827.   show bg field "price"
  828.   show bg field "ppd$"
  829.   show bg field "vendorname"
  830.   show bg field "vendoraddr1"
  831.   show bg field "vendorphone"
  832.   show bg field "originatorname"
  833.   show bg field "reviewername"
  834.   show bg field "book"
  835.   show bg field "bookpage"
  836.   show bg field "articletype"
  837.   show bg field "domain"
  838.   show bg field "WEA?"
  839.   show bg field "publicityphone"
  840.   show bg field "misc"
  841.   unlock screen
  842. end mouseUp
  843.  
  844.  
  845.  
  846. -- part 93 (button)
  847. -- low flags: 80
  848. -- high flags: A003
  849. -- rect: left=79 top=327 right=342 bottom=224
  850. -- title width / last selected line: 0
  851. -- icon id / first selected line: 0 / 0
  852. -- text alignment: 1
  853. -- font id: 0
  854. -- text size: 12
  855. -- style flags: 0
  856. -- line height: 16
  857. -- part name: Hide Fields
  858. ----- HyperTalk script -----
  859. on mouseUp
  860.   lock screen
  861.   hide bg field "ISBN"
  862.   hide bg field "keywords"
  863.   hide bg field "longtitle"
  864.   hide bg field "realsubtitle"
  865.   hide bg field "authorname"
  866.   hide bg field "authorindexed"
  867.   hide bg field "pubyear"
  868.   hide bg field "pages"
  869.   hide bg field "price"
  870.   hide bg field "ppd$"
  871.   hide bg field "vendorname"
  872.   hide bg field "vendoraddr1"
  873.   hide bg field "vendorphone"
  874.   hide bg field "originatorname"
  875.   hide bg field "reviewername"
  876.   hide bg field "book"
  877.   hide bg field "bookpage"
  878.   hide bg field "articletype"
  879.   hide bg field "domain"
  880.   hide bg field "WEA?"
  881.   hide bg field "publicityphone"
  882.   hide bg field "misc"
  883.   unlock screen
  884. end mouseUp
  885.  
  886.  
  887.  
  888. -- part 94 (button)
  889. -- low flags: 80
  890. -- high flags: 8003
  891. -- rect: left=0 top=291 right=313 bottom=100
  892. -- title width / last selected line: 0
  893. -- icon id / first selected line: 0 / 0
  894. -- text alignment: 1
  895. -- font id: 0
  896. -- text size: 12
  897. -- style flags: 0
  898. -- line height: 16
  899. -- part name: Pour Access
  900. ----- HyperTalk script -----
  901. on mouseUp
  902.   pourAccess
  903.   send mouseUp to bg btn "Hide Fields"
  904. end mouseUp
  905.  
  906. on pourAccess
  907.   put empty into accessInfo
  908.  
  909.   -- take care of the title
  910.   put fld "realSubTitle" into realSubTitle
  911.   put fld "longTitle" into longTitle
  912.  
  913.   if realSubTitle is not empty then
  914.     put stripCR(realSubTitle) & Return after accessInfo
  915.   else if fld "longTitle" is not empty then
  916.     put stripCR(longTitle) & Return after accessInfo
  917.   else
  918.     --put Return after accessInfo
  919.   end if
  920.  
  921.   -- now the author name
  922.   if fld "authorName" is not empty then
  923.     put stripCR(fld "authorName") & Return after accessInfo
  924.   end if
  925.  
  926.   -- publication year and number of pages
  927.   put fld "pubYear" into pubYear
  928.   put fld "pages" into pages
  929.   if pubYear is not empty AND pages is not empty then
  930.     put stripCR(pubYear) & ";" && stripCR(pages) & Return after accessInfo
  931.   else if fld "pubYear" is not empty AND fld "pages" is empty then
  932.     put stripCR(pubYear) & Return after accessInfo
  933.   else if fld "pubYear" is empty AND fld "pages" is not empty then
  934.     put stripCR(pages) & Return after accessInfo
  935.   end if
  936.  
  937.   -- ISBN
  938.   put fld "ISBN" into ISBN
  939.   if ISBN is not empty then
  940.     if fld "articleType" = "pr" then
  941.       put "ISSN" && stripCR(ISBN) & Return after accessInfo
  942.     else          -- if fld "articleType" = "br" then
  943.       put "ISBN" && stripCR(ISBN) & Return  after accessInfo
  944.     end if
  945.   end if
  946.  
  947.   -- Price
  948.   put fld "price" into price
  949.   put fld "ppd$" into ppd
  950.   if price is not empty AND ppd is not empty then
  951.     put stripCR(price) && stripCR(ppd) after accessInfo
  952.   else if price is not empty AND ppd is empty then
  953.     put price after accessInfo
  954.   else if price is empty AND ppd is not empty then
  955.     put ppd after accessInfo
  956.   end if
  957.   put Return after accessInfo
  958.  
  959.   -- vendor
  960.   if fld "vendorName" is not empty then
  961.     put "from:" & Return & Return & stripCR(fld "vendorName") & Return after accessInfo
  962.   end if
  963.  
  964.   if fld "vendorAddr1" is not empty then
  965.     put stripCR(fld "vendorAddr1") & Return after accessInfo
  966.   end if
  967.  
  968.   if fld "vendorPhone" is not empty then
  969.     put stripCR(fld "vendorPhone") & Return after accessInfo
  970.   end if
  971.  
  972.   -- Misc
  973.   if fld "misc" is not empty then
  974.     put Return & stripCR(fld "misc") & Return after accessInfo
  975.   end if
  976.  
  977.   put accessInfo into fld "theAccess"
  978. end pourAccess
  979.  
  980. function stripCR theInfo
  981. repeat forever
  982.   if last char of theInfo is " " OR last char of theInfo is Return then
  983.     delete last char of theInfo
  984.   else
  985.     exit repeat
  986.   end if
  987. end repeat
  988.  
  989. return theInfo
  990. end stripCR
  991.  
  992. function hasBgButton what
  993. repeat with i = 1 to number of bg buttons
  994.   if short name of bg button i = what then return true
  995. end repeat
  996. return false
  997. end hasBgButton
  998.  
  999. on slagBgButtons btnName
  1000.   repeat while hasBgButton(btnName) is true
  1001.     show bg btn btnName
  1002.     select bg btn btnName
  1003.     doMenu "Clear Button"
  1004.   end repeat
  1005. end slagBgButtons
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011. -- part 97 (field)
  1012. -- low flags: 81
  1013. -- high flags: 0002
  1014. -- rect: left=0 top=324 right=342 bottom=16
  1015. -- title width / last selected line: 0
  1016. -- icon id / first selected line: 0 / 0
  1017. -- text alignment: 0
  1018. -- font id: 3
  1019. -- text size: 12
  1020. -- style flags: 0
  1021. -- line height: 16
  1022. -- part name: beenUpdated
  1023.