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

  1. -- background: 17551 from stack: in
  2. -- bmap block id: 19479
  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 (button)
  285. -- low flags: 00
  286. -- high flags: 0000
  287. -- rect: left=353 top=317 right=338 bottom=386
  288. -- title width / last selected line: 0
  289. -- icon id / first selected line: 1014 / 1014
  290. -- text alignment: 1
  291. -- font id: 0
  292. -- text size: 12
  293. -- style flags: 0
  294. -- line height: 16
  295. -- part name: Up
  296. ----- HyperTalk script -----
  297. on mouseUp
  298.   doArticleUpButton
  299. end mouseUp
  300.  
  301.  
  302.  
  303. -- part 34 (button)
  304. -- low flags: 00
  305. -- high flags: 0000
  306. -- rect: left=423 top=317 right=338 bottom=453
  307. -- title width / last selected line: 0
  308. -- icon id / first selected line: 1013 / 1013
  309. -- text alignment: 1
  310. -- font id: 0
  311. -- text size: 12
  312. -- style flags: 0
  313. -- line height: 16
  314. -- part name: Down
  315. ----- HyperTalk script -----
  316. on mouseUp
  317.   doArticleDownButton
  318. end mouseUp
  319.  
  320.  
  321.  
  322. -- part 35 (button)
  323. -- low flags: 00
  324. -- high flags: 0000
  325. -- rect: left=482 top=184 right=230 bottom=507
  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: Right
  334. ----- HyperTalk script -----
  335. on mouseUp
  336.   doArticleRightButton
  337. end mouseUp
  338.  
  339.  
  340.  
  341. -- part 36 (button)
  342. -- low flags: 00
  343. -- high flags: 0000
  344. -- rect: left=463 top=232 right=275 bottom=488
  345. -- title width / last selected line: 0
  346. -- icon id / first selected line: 0 / 0
  347. -- text alignment: 1
  348. -- font id: 0
  349. -- text size: 12
  350. -- style flags: 0
  351. -- line height: 16
  352. -- part name: Left
  353. ----- HyperTalk script -----
  354. on mouseUp
  355.   doArticleLeftButton
  356. end mouseUp
  357.  
  358.  
  359.  
  360. -- part 37 (field)
  361. -- low flags: 81
  362. -- high flags: 0002
  363. -- rect: left=170 top=0 right=18 bottom=256
  364. -- title width / last selected line: 0
  365. -- icon id / first selected line: 0 / 0
  366. -- text alignment: 0
  367. -- font id: 3
  368. -- text size: 12
  369. -- style flags: 0
  370. -- line height: 16
  371. -- part name: SurveyAccession
  372.  
  373.  
  374. -- part 38 (field)
  375. -- low flags: 81
  376. -- high flags: 0002
  377. -- rect: left=410 top=128 right=143 bottom=512
  378. -- title width / last selected line: 0
  379. -- icon id / first selected line: 0 / 0
  380. -- text alignment: 0
  381. -- font id: 4
  382. -- text size: 9
  383. -- style flags: 0
  384. -- line height: 12
  385. -- part name: MapDest
  386.  
  387.  
  388. -- part 39 (field)
  389. -- low flags: 81
  390. -- high flags: 0002
  391. -- rect: left=410 top=272 right=287 bottom=512
  392. -- title width / last selected line: 0
  393. -- icon id / first selected line: 0 / 0
  394. -- text alignment: 0
  395. -- font id: 4
  396. -- text size: 9
  397. -- style flags: 0
  398. -- line height: 12
  399. -- part name: LeftDest
  400.  
  401.  
  402. -- part 40 (field)
  403. -- low flags: 81
  404. -- high flags: 0002
  405. -- rect: left=410 top=225 right=240 bottom=512
  406. -- title width / last selected line: 0
  407. -- icon id / first selected line: 0 / 0
  408. -- text alignment: 0
  409. -- font id: 4
  410. -- text size: 9
  411. -- style flags: 0
  412. -- line height: 12
  413. -- part name: RightDest
  414.  
  415.  
  416. -- part 41 (field)
  417. -- low flags: 81
  418. -- high flags: 0002
  419. -- rect: left=354 top=285 right=300 bottom=456
  420. -- title width / last selected line: 0
  421. -- icon id / first selected line: 0 / 0
  422. -- text alignment: 0
  423. -- font id: 4
  424. -- text size: 9
  425. -- style flags: 0
  426. -- line height: 12
  427. -- part name: UpDest
  428.  
  429.  
  430. -- part 42 (field)
  431. -- low flags: 81
  432. -- high flags: 0002
  433. -- rect: left=354 top=301 right=316 bottom=456
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 0
  437. -- font id: 4
  438. -- text size: 9
  439. -- style flags: 0
  440. -- line height: 12
  441. -- part name: DownDest
  442.  
  443.  
  444. -- part 43 (field)
  445. -- low flags: 81
  446. -- high flags: 0002
  447. -- rect: left=163 top=172 right=232 bottom=277
  448. -- title width / last selected line: 0
  449. -- icon id / first selected line: 0 / 0
  450. -- text alignment: 0
  451. -- font id: 3
  452. -- text size: 10
  453. -- style flags: 0
  454. -- line height: 13
  455. -- part name: PopupDest
  456.  
  457.  
  458. -- part 44 (field)
  459. -- low flags: 81
  460. -- high flags: 0002
  461. -- rect: left=73 top=85 right=117 bottom=237
  462. -- title width / last selected line: 0
  463. -- icon id / first selected line: 0 / 0
  464. -- text alignment: 0
  465. -- font id: 3
  466. -- text size: 10
  467. -- style flags: 256
  468. -- line height: 13
  469. -- part name: RealSubtitle
  470.  
  471.  
  472. -- part 45 (field)
  473. -- low flags: 81
  474. -- high flags: 0002
  475. -- rect: left=230 top=312 right=342 bottom=303
  476. -- title width / last selected line: 0
  477. -- icon id / first selected line: 0 / 0
  478. -- text alignment: 0
  479. -- font id: 3
  480. -- text size: 12
  481. -- style flags: 0
  482. -- line height: 16
  483. -- part name: publicityphone
  484.  
  485.  
  486. -- part 46 (field)
  487. -- low flags: 81
  488. -- high flags: 0002
  489. -- rect: left=33 top=271 right=308 bottom=289
  490. -- title width / last selected line: 0
  491. -- icon id / first selected line: 0 / 0
  492. -- text alignment: 0
  493. -- font id: 3
  494. -- text size: 9
  495. -- style flags: 0
  496. -- line height: 11
  497. -- part name: misc
  498.  
  499.  
  500. -- part 47 (field)
  501. -- low flags: 81
  502. -- high flags: 0002
  503. -- rect: left=316 top=327 right=340 bottom=331
  504. -- title width / last selected line: 0
  505. -- icon id / first selected line: 0 / 0
  506. -- text alignment: 0
  507. -- font id: 4
  508. -- text size: 12
  509. -- style flags: 256
  510. -- line height: 13
  511. -- part name: WEA?
  512.  
  513.  
  514. -- part 48 (field)
  515. -- low flags: 81
  516. -- high flags: 0002
  517. -- rect: left=425 top=298 right=313 bottom=511
  518. -- title width / last selected line: 0
  519. -- icon id / first selected line: 0 / 0
  520. -- text alignment: 0
  521. -- font id: 3
  522. -- text size: 9
  523. -- style flags: 0
  524. -- line height: 11
  525. -- part name: domain
  526.  
  527.  
  528. -- part 49 (field)
  529. -- low flags: 81
  530. -- high flags: 0002
  531. -- rect: left=386 top=298 right=314 bottom=422
  532. -- title width / last selected line: 0
  533. -- icon id / first selected line: 0 / 0
  534. -- text alignment: 0
  535. -- font id: 3
  536. -- text size: 9
  537. -- style flags: 0
  538. -- line height: 11
  539. -- part name: articleType
  540.  
  541.  
  542. -- part 50 (field)
  543. -- low flags: 81
  544. -- high flags: 0002
  545. -- rect: left=348 top=298 right=314 bottom=384
  546. -- title width / last selected line: 0
  547. -- icon id / first selected line: 0 / 0
  548. -- text alignment: 0
  549. -- font id: 3
  550. -- text size: 9
  551. -- style flags: 0
  552. -- line height: 11
  553. -- part name: bookPage
  554.  
  555.  
  556. -- part 51 (field)
  557. -- low flags: 81
  558. -- high flags: 0002
  559. -- rect: left=310 top=298 right=314 bottom=346
  560. -- title width / last selected line: 0
  561. -- icon id / first selected line: 0 / 0
  562. -- text alignment: 0
  563. -- font id: 3
  564. -- text size: 9
  565. -- style flags: 0
  566. -- line height: 11
  567. -- part name: book
  568.  
  569.  
  570. -- part 52 (field)
  571. -- low flags: 81
  572. -- high flags: 0002
  573. -- rect: left=310 top=282 right=298 bottom=486
  574. -- title width / last selected line: 0
  575. -- icon id / first selected line: 0 / 0
  576. -- text alignment: 0
  577. -- font id: 3
  578. -- text size: 9
  579. -- style flags: 0
  580. -- line height: 11
  581. -- part name: reviewername
  582.  
  583.  
  584. -- part 53 (field)
  585. -- low flags: 81
  586. -- high flags: 0002
  587. -- rect: left=310 top=266 right=282 bottom=487
  588. -- title width / last selected line: 0
  589. -- icon id / first selected line: 0 / 0
  590. -- text alignment: 0
  591. -- font id: 3
  592. -- text size: 9
  593. -- style flags: 0
  594. -- line height: 11
  595. -- part name: originatorName
  596.  
  597.  
  598. -- part 54 (field)
  599. -- low flags: 81
  600. -- high flags: 0002
  601. -- rect: left=309 top=248 right=275 bottom=501
  602. -- title width / last selected line: 0
  603. -- icon id / first selected line: 0 / 0
  604. -- text alignment: 0
  605. -- font id: 3
  606. -- text size: 9
  607. -- style flags: 0
  608. -- line height: 11
  609. -- part name: vendorPhone
  610.  
  611.  
  612. -- part 55 (field)
  613. -- low flags: 81
  614. -- high flags: 0002
  615. -- rect: left=309 top=204 right=250 bottom=512
  616. -- title width / last selected line: 0
  617. -- icon id / first selected line: 0 / 0
  618. -- text alignment: 0
  619. -- font id: 3
  620. -- text size: 9
  621. -- style flags: 0
  622. -- line height: 11
  623. -- part name: vendorAddr1
  624.  
  625.  
  626. -- part 56 (field)
  627. -- low flags: 81
  628. -- high flags: 0002
  629. -- rect: left=307 top=185 right=219 bottom=510
  630. -- title width / last selected line: 0
  631. -- icon id / first selected line: 0 / 0
  632. -- text alignment: 0
  633. -- font id: 3
  634. -- text size: 9
  635. -- style flags: 0
  636. -- line height: 11
  637. -- part name: vendorName
  638.  
  639.  
  640. -- part 57 (field)
  641. -- low flags: 81
  642. -- high flags: 0002
  643. -- rect: left=433 top=144 right=191 bottom=499
  644. -- title width / last selected line: 0
  645. -- icon id / first selected line: 0 / 0
  646. -- text alignment: 0
  647. -- font id: 3
  648. -- text size: 9
  649. -- style flags: 0
  650. -- line height: 11
  651. -- part name: ppd$
  652.  
  653.  
  654. -- part 58 (field)
  655. -- low flags: 81
  656. -- high flags: 0002
  657. -- rect: left=307 top=152 right=189 bottom=454
  658. -- title width / last selected line: 0
  659. -- icon id / first selected line: 0 / 0
  660. -- text alignment: 0
  661. -- font id: 3
  662. -- text size: 9
  663. -- style flags: 0
  664. -- line height: 11
  665. -- part name: price
  666.  
  667.  
  668. -- part 59 (field)
  669. -- low flags: 81
  670. -- high flags: 0002
  671. -- rect: left=443 top=127 right=145 bottom=512
  672. -- title width / last selected line: 0
  673. -- icon id / first selected line: 0 / 0
  674. -- text alignment: 0
  675. -- font id: 3
  676. -- text size: 9
  677. -- style flags: 0
  678. -- line height: 11
  679. -- part name: pages
  680.  
  681.  
  682. -- part 60 (field)
  683. -- low flags: 81
  684. -- high flags: 0002
  685. -- rect: left=307 top=123 right=152 bottom=399
  686. -- title width / last selected line: 0
  687. -- icon id / first selected line: 0 / 0
  688. -- text alignment: 0
  689. -- font id: 3
  690. -- text size: 9
  691. -- style flags: 0
  692. -- line height: 11
  693. -- part name: pubYear
  694.  
  695.  
  696. -- part 61 (field)
  697. -- low flags: 81
  698. -- high flags: 0002
  699. -- rect: left=307 top=112 right=127 bottom=503
  700. -- title width / last selected line: 0
  701. -- icon id / first selected line: 0 / 0
  702. -- text alignment: 0
  703. -- font id: 3
  704. -- text size: 9
  705. -- style flags: 0
  706. -- line height: 11
  707. -- part name: authorIndexed
  708.  
  709.  
  710. -- part 62 (field)
  711. -- low flags: 81
  712. -- high flags: 0002
  713. -- rect: left=307 top=86 right=113 bottom=504
  714. -- title width / last selected line: 0
  715. -- icon id / first selected line: 0 / 0
  716. -- text alignment: 0
  717. -- font id: 3
  718. -- text size: 9
  719. -- style flags: 0
  720. -- line height: 11
  721. -- part name: authorName
  722.  
  723.  
  724. -- part 63 (field)
  725. -- low flags: 81
  726. -- high flags: 0002
  727. -- rect: left=307 top=61 right=87 bottom=497
  728. -- title width / last selected line: 0
  729. -- icon id / first selected line: 0 / 0
  730. -- text alignment: 0
  731. -- font id: 3
  732. -- text size: 9
  733. -- style flags: 0
  734. -- line height: 12
  735. -- part name: longTitle
  736.  
  737.  
  738. -- part 64 (field)
  739. -- low flags: 81
  740. -- high flags: 0002
  741. -- rect: left=373 top=14 right=63 bottom=509
  742. -- title width / last selected line: 0
  743. -- icon id / first selected line: 0 / 0
  744. -- text alignment: 0
  745. -- font id: 3
  746. -- text size: 9
  747. -- style flags: 0
  748. -- line height: 11
  749. -- part name: keyWords
  750.  
  751.  
  752. -- part 65 (field)
  753. -- low flags: 81
  754. -- high flags: 0002
  755. -- rect: left=245 top=18 right=36 bottom=361
  756. -- title width / last selected line: 0
  757. -- icon id / first selected line: 0 / 0
  758. -- text alignment: 0
  759. -- font id: 3
  760. -- text size: 12
  761. -- style flags: 0
  762. -- line height: 16
  763. -- part name: ISBN
  764.  
  765.  
  766. -- part 67 (button)
  767. -- low flags: 80
  768. -- high flags: A003
  769. -- rect: left=79 top=312 right=327 bottom=223
  770. -- title width / last selected line: 0
  771. -- icon id / first selected line: 0 / 0
  772. -- text alignment: 1
  773. -- font id: 0
  774. -- text size: 12
  775. -- style flags: 0
  776. -- line height: 16
  777. -- part name: Show Fields
  778. ----- HyperTalk script -----
  779. on mouseUp
  780.   lock screen
  781.   show bg field "ISBN"
  782.   show bg field "keywords"
  783.   show bg field "longtitle"
  784.   show bg field "realsubtitle"
  785.   show bg field "authorname"
  786.   show bg field "authorindexed"
  787.   show bg field "pubyear"
  788.   show bg field "pages"
  789.   show bg field "price"
  790.   show bg field "ppd$"
  791.   show bg field "vendorname"
  792.   show bg field "vendoraddr1"
  793.   show bg field "vendorphone"
  794.   show bg field "originatorname"
  795.   show bg field "reviewername"
  796.   show bg field "book"
  797.   show bg field "bookpage"
  798.   show bg field "articletype"
  799.   show bg field "domain"
  800.   show bg field "WEA?"
  801.   show bg field "publicityphone"
  802.   show bg field "misc"
  803.   unlock screen
  804. end mouseUp
  805.  
  806.  
  807.  
  808. -- part 68 (button)
  809. -- low flags: 80
  810. -- high flags: A003
  811. -- rect: left=79 top=327 right=342 bottom=224
  812. -- title width / last selected line: 0
  813. -- icon id / first selected line: 0 / 0
  814. -- text alignment: 1
  815. -- font id: 0
  816. -- text size: 12
  817. -- style flags: 0
  818. -- line height: 16
  819. -- part name: Hide Fields
  820. ----- HyperTalk script -----
  821. on mouseUp
  822.   lock screen
  823.   hide bg field "ISBN"
  824.   hide bg field "keywords"
  825.   hide bg field "longtitle"
  826.   hide bg field "realsubtitle"
  827.   hide bg field "authorname"
  828.   hide bg field "authorindexed"
  829.   hide bg field "pubyear"
  830.   hide bg field "pages"
  831.   hide bg field "price"
  832.   hide bg field "ppd$"
  833.   hide bg field "vendorname"
  834.   hide bg field "vendoraddr1"
  835.   hide bg field "vendorphone"
  836.   hide bg field "originatorname"
  837.   hide bg field "reviewername"
  838.   hide bg field "book"
  839.   hide bg field "bookpage"
  840.   hide bg field "articletype"
  841.   hide bg field "domain"
  842.   hide bg field "WEA?"
  843.   hide bg field "publicityphone"
  844.   hide bg field "misc"
  845.   unlock screen
  846. end mouseUp
  847.  
  848.  
  849.  
  850. -- part 69 (button)
  851. -- low flags: 80
  852. -- high flags: A003
  853. -- rect: left=4 top=313 right=328 bottom=79
  854. -- title width / last selected line: 0
  855. -- icon id / first selected line: 0 / 0
  856. -- text alignment: 1
  857. -- font id: 0
  858. -- text size: 12
  859. -- style flags: 0
  860. -- line height: 16
  861. -- part name: Show Pic
  862. ----- HyperTalk script -----
  863. on mouseUp
  864.   show Card picture
  865. end mouseUp
  866.  
  867.  
  868.  
  869. -- part 70 (button)
  870. -- low flags: 80
  871. -- high flags: A003
  872. -- rect: left=4 top=327 right=342 bottom=77
  873. -- title width / last selected line: 0
  874. -- icon id / first selected line: 0 / 0
  875. -- text alignment: 1
  876. -- font id: 0
  877. -- text size: 12
  878. -- style flags: 0
  879. -- line height: 16
  880. -- part name: Hide Pic
  881. ----- HyperTalk script -----
  882. on mouseUp
  883.   hide Card picture
  884. end mouseUp
  885.  
  886.  
  887.  
  888. -- part 71 (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 72 (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.