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

  1. -- background: 4934 from stack: in
  2. -- bmap block id: 22183
  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 20 (field)
  172. -- low flags: 01
  173. -- high flags: 2000
  174. -- rect: left=28 top=40 right=64 bottom=463
  175. -- title width / last selected line: 0
  176. -- icon id / first selected line: 0 / 0
  177. -- text alignment: 0
  178. -- font id: 3
  179. -- text size: 14
  180. -- style flags: 768
  181. -- line height: 18
  182. -- part name: theTitle
  183.  
  184.  
  185. -- part 22 (field)
  186. -- low flags: 01
  187. -- high flags: 0002
  188. -- rect: left=345 top=22 right=41 bottom=463
  189. -- title width / last selected line: 0
  190. -- icon id / first selected line: 0 / 0
  191. -- text alignment: 1
  192. -- font id: 0
  193. -- text size: 12
  194. -- style flags: 0
  195. -- line height: 16
  196. -- part name: theHeading
  197. ----- HyperTalk script -----
  198. on mouseDown
  199.   popMenuArticle
  200. end mouseDown
  201.  
  202.  
  203.  
  204. -- part 26 (button)
  205. -- low flags: 00
  206. -- high flags: 0000
  207. -- rect: left=423 top=317 right=338 bottom=453
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 1013 / 1013
  210. -- text alignment: 1
  211. -- font id: 0
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: Down
  216. ----- HyperTalk script -----
  217. on mouseUp
  218.   doArticleDownButton
  219. end mouseUp
  220.  
  221.  
  222.  
  223. -- part 27 (button)
  224. -- low flags: 00
  225. -- high flags: 0000
  226. -- rect: left=353 top=317 right=338 bottom=386
  227. -- title width / last selected line: 0
  228. -- icon id / first selected line: 1014 / 1014
  229. -- text alignment: 1
  230. -- font id: 0
  231. -- text size: 12
  232. -- style flags: 0
  233. -- line height: 16
  234. -- part name: Up
  235. ----- HyperTalk script -----
  236. on mouseUp
  237.   doArticleUpButton
  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: 81
  272. -- high flags: 0002
  273. -- rect: left=170 top=0 right=18 bottom=256
  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: 0
  280. -- line height: 16
  281. -- part name: SurveyAccession
  282.  
  283.  
  284. -- part 33 (field)
  285. -- low flags: 01
  286. -- high flags: 2000
  287. -- rect: left=28 top=59 right=81 bottom=463
  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: 256
  294. -- line height: 16
  295. -- part name: theSubtitle
  296.  
  297.  
  298. -- part 34 (button)
  299. -- low flags: 00
  300. -- high flags: 0000
  301. -- rect: left=463 top=232 right=275 bottom=488
  302. -- title width / last selected line: 0
  303. -- icon id / first selected line: 0 / 0
  304. -- text alignment: 1
  305. -- font id: 0
  306. -- text size: 12
  307. -- style flags: 0
  308. -- line height: 16
  309. -- part name: Left
  310. ----- HyperTalk script -----
  311. on mouseUp
  312.   doArticleLeftButton
  313. end mouseUp
  314.  
  315.  
  316.  
  317. -- part 35 (button)
  318. -- low flags: 00
  319. -- high flags: 0000
  320. -- rect: left=482 top=184 right=230 bottom=507
  321. -- title width / last selected line: 0
  322. -- icon id / first selected line: 0 / 0
  323. -- text alignment: 1
  324. -- font id: 0
  325. -- text size: 12
  326. -- style flags: 0
  327. -- line height: 16
  328. -- part name: Right
  329. ----- HyperTalk script -----
  330. on mouseUp
  331.   doArticleRightButton
  332. end mouseUp
  333.  
  334.  
  335.  
  336. -- part 40 (field)
  337. -- low flags: 81
  338. -- high flags: 0002
  339. -- rect: left=245 top=18 right=36 bottom=361
  340. -- title width / last selected line: 0
  341. -- icon id / first selected line: 0 / 0
  342. -- text alignment: 0
  343. -- font id: 3
  344. -- text size: 12
  345. -- style flags: 0
  346. -- line height: 16
  347. -- part name: ISBN
  348.  
  349.  
  350. -- part 41 (field)
  351. -- low flags: 83
  352. -- high flags: 0002
  353. -- rect: left=373 top=14 right=63 bottom=509
  354. -- title width / last selected line: 0
  355. -- icon id / first selected line: 0 / 0
  356. -- text alignment: 0
  357. -- font id: 3
  358. -- text size: 9
  359. -- style flags: 0
  360. -- line height: 11
  361. -- part name: keyWords
  362.  
  363.  
  364. -- part 44 (field)
  365. -- low flags: 81
  366. -- high flags: 0002
  367. -- rect: left=73 top=85 right=117 bottom=237
  368. -- title width / last selected line: 0
  369. -- icon id / first selected line: 0 / 0
  370. -- text alignment: 0
  371. -- font id: 3
  372. -- text size: 10
  373. -- style flags: 256
  374. -- line height: 13
  375. -- part name: RealSubtitle
  376.  
  377.  
  378. -- part 46 (field)
  379. -- low flags: 83
  380. -- high flags: 0002
  381. -- rect: left=33 top=271 right=308 bottom=289
  382. -- title width / last selected line: 0
  383. -- icon id / first selected line: 0 / 0
  384. -- text alignment: 0
  385. -- font id: 3
  386. -- text size: 9
  387. -- style flags: 0
  388. -- line height: 11
  389. -- part name: misc
  390.  
  391.  
  392. -- part 47 (button)
  393. -- low flags: 80
  394. -- high flags: A003
  395. -- rect: left=4 top=313 right=328 bottom=79
  396. -- title width / last selected line: 0
  397. -- icon id / first selected line: 0 / 0
  398. -- text alignment: 1
  399. -- font id: 0
  400. -- text size: 12
  401. -- style flags: 0
  402. -- line height: 16
  403. -- part name: Show Pic
  404. ----- HyperTalk script -----
  405. on mouseUp
  406.   show Card picture
  407. end mouseUp
  408.  
  409.  
  410.  
  411. -- part 48 (button)
  412. -- low flags: 80
  413. -- high flags: A003
  414. -- rect: left=4 top=327 right=342 bottom=77
  415. -- title width / last selected line: 0
  416. -- icon id / first selected line: 0 / 0
  417. -- text alignment: 1
  418. -- font id: 0
  419. -- text size: 12
  420. -- style flags: 0
  421. -- line height: 16
  422. -- part name: Hide Pic
  423. ----- HyperTalk script -----
  424. on mouseUp
  425.   hide Card picture
  426. end mouseUp
  427.  
  428.  
  429.  
  430. -- part 51 (field)
  431. -- low flags: 81
  432. -- high flags: 0002
  433. -- rect: left=230 top=312 right=342 bottom=303
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 0
  437. -- font id: 3
  438. -- text size: 12
  439. -- style flags: 0
  440. -- line height: 16
  441. -- part name: publicityphone
  442.  
  443.  
  444. -- part 53 (field)
  445. -- low flags: 81
  446. -- high flags: 0002
  447. -- rect: left=307 top=61 right=87 bottom=497
  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: 9
  453. -- style flags: 0
  454. -- line height: 12
  455. -- part name: longTitle
  456.  
  457.  
  458. -- part 55 (field)
  459. -- low flags: 83
  460. -- high flags: 0002
  461. -- rect: left=307 top=86 right=113 bottom=504
  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: 9
  467. -- style flags: 0
  468. -- line height: 11
  469. -- part name: authorName
  470.  
  471.  
  472. -- part 56 (field)
  473. -- low flags: 83
  474. -- high flags: 0002
  475. -- rect: left=307 top=112 right=127 bottom=503
  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: 9
  481. -- style flags: 0
  482. -- line height: 11
  483. -- part name: authorIndexed
  484.  
  485.  
  486. -- part 58 (field)
  487. -- low flags: 83
  488. -- high flags: 0002
  489. -- rect: left=307 top=123 right=152 bottom=399
  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: pubYear
  498.  
  499.  
  500. -- part 60 (button)
  501. -- low flags: 00
  502. -- high flags: 0000
  503. -- rect: left=463 top=88 right=130 bottom=507
  504. -- title width / last selected line: 0
  505. -- icon id / first selected line: 0 / 0
  506. -- text alignment: 1
  507. -- font id: 0
  508. -- text size: 12
  509. -- style flags: 0
  510. -- line height: 16
  511. -- part name: Earth
  512. ----- HyperTalk script -----
  513. on mouseUp
  514.   goWholeEarth
  515. end mouseUp
  516.  
  517.  
  518.  
  519. -- part 62 (field)
  520. -- low flags: 83
  521. -- high flags: 0002
  522. -- rect: left=307 top=152 right=189 bottom=454
  523. -- title width / last selected line: 0
  524. -- icon id / first selected line: 0 / 0
  525. -- text alignment: 0
  526. -- font id: 3
  527. -- text size: 9
  528. -- style flags: 0
  529. -- line height: 11
  530. -- part name: price
  531.  
  532.  
  533. -- part 64 (button)
  534. -- low flags: 00
  535. -- high flags: 0000
  536. -- rect: left=463 top=139 right=173 bottom=508
  537. -- title width / last selected line: 0
  538. -- icon id / first selected line: 0 / 0
  539. -- text alignment: 1
  540. -- font id: 0
  541. -- text size: 12
  542. -- style flags: 0
  543. -- line height: 16
  544. -- part name: Map
  545. ----- HyperTalk script -----
  546. on mouseUp
  547.   doArticleMapButton
  548. end mouseUp
  549.  
  550.  
  551.  
  552. -- part 66 (field)
  553. -- low flags: 83
  554. -- high flags: 0002
  555. -- rect: left=307 top=185 right=219 bottom=510
  556. -- title width / last selected line: 0
  557. -- icon id / first selected line: 0 / 0
  558. -- text alignment: 0
  559. -- font id: 3
  560. -- text size: 9
  561. -- style flags: 0
  562. -- line height: 11
  563. -- part name: vendorName
  564.  
  565.  
  566. -- part 68 (field)
  567. -- low flags: 83
  568. -- high flags: 0002
  569. -- rect: left=309 top=204 right=250 bottom=512
  570. -- title width / last selected line: 0
  571. -- icon id / first selected line: 0 / 0
  572. -- text alignment: 0
  573. -- font id: 3
  574. -- text size: 9
  575. -- style flags: 0
  576. -- line height: 11
  577. -- part name: vendorAddr1
  578.  
  579.  
  580. -- part 70 (field)
  581. -- low flags: 83
  582. -- high flags: 0002
  583. -- rect: left=309 top=248 right=275 bottom=501
  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: 9
  589. -- style flags: 0
  590. -- line height: 11
  591. -- part name: vendorPhone
  592.  
  593.  
  594. -- part 71 (field)
  595. -- low flags: 83
  596. -- high flags: 0002
  597. -- rect: left=310 top=266 right=282 bottom=487
  598. -- title width / last selected line: 0
  599. -- icon id / first selected line: 0 / 0
  600. -- text alignment: 0
  601. -- font id: 3
  602. -- text size: 9
  603. -- style flags: 0
  604. -- line height: 11
  605. -- part name: originatorName
  606.  
  607.  
  608. -- part 72 (field)
  609. -- low flags: 83
  610. -- high flags: 0002
  611. -- rect: left=310 top=282 right=298 bottom=486
  612. -- title width / last selected line: 0
  613. -- icon id / first selected line: 0 / 0
  614. -- text alignment: 0
  615. -- font id: 3
  616. -- text size: 9
  617. -- style flags: 0
  618. -- line height: 11
  619. -- part name: reviewerName
  620.  
  621.  
  622. -- part 73 (field)
  623. -- low flags: 83
  624. -- high flags: 0002
  625. -- rect: left=310 top=298 right=314 bottom=346
  626. -- title width / last selected line: 0
  627. -- icon id / first selected line: 0 / 0
  628. -- text alignment: 0
  629. -- font id: 3
  630. -- text size: 9
  631. -- style flags: 0
  632. -- line height: 11
  633. -- part name: book
  634.  
  635.  
  636. -- part 74 (field)
  637. -- low flags: 83
  638. -- high flags: 0002
  639. -- rect: left=348 top=298 right=314 bottom=384
  640. -- title width / last selected line: 0
  641. -- icon id / first selected line: 0 / 0
  642. -- text alignment: 0
  643. -- font id: 3
  644. -- text size: 9
  645. -- style flags: 0
  646. -- line height: 11
  647. -- part name: bookPage
  648.  
  649.  
  650. -- part 75 (field)
  651. -- low flags: 83
  652. -- high flags: 0002
  653. -- rect: left=386 top=298 right=314 bottom=422
  654. -- title width / last selected line: 0
  655. -- icon id / first selected line: 0 / 0
  656. -- text alignment: 0
  657. -- font id: 3
  658. -- text size: 9
  659. -- style flags: 0
  660. -- line height: 11
  661. -- part name: articleType
  662.  
  663.  
  664. -- part 76 (field)
  665. -- low flags: 83
  666. -- high flags: 0002
  667. -- rect: left=425 top=298 right=313 bottom=511
  668. -- title width / last selected line: 0
  669. -- icon id / first selected line: 0 / 0
  670. -- text alignment: 0
  671. -- font id: 3
  672. -- text size: 9
  673. -- style flags: 0
  674. -- line height: 11
  675. -- part name: domain
  676.  
  677.  
  678. -- part 77 (field)
  679. -- low flags: 83
  680. -- high flags: 0002
  681. -- rect: left=316 top=327 right=340 bottom=331
  682. -- title width / last selected line: 0
  683. -- icon id / first selected line: 0 / 0
  684. -- text alignment: 0
  685. -- font id: 4
  686. -- text size: 12
  687. -- style flags: 256
  688. -- line height: 13
  689. -- part name: WEA?
  690.  
  691.  
  692. -- part 80 (field)
  693. -- low flags: 83
  694. -- high flags: 0002
  695. -- rect: left=443 top=127 right=145 bottom=512
  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: 9
  701. -- style flags: 0
  702. -- line height: 11
  703. -- part name: pages
  704.  
  705.  
  706. -- part 81 (field)
  707. -- low flags: 83
  708. -- high flags: 0002
  709. -- rect: left=433 top=144 right=191 bottom=499
  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: 9
  715. -- style flags: 0
  716. -- line height: 11
  717. -- part name: ppd$
  718.  
  719.  
  720. -- part 82 (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 83 (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 84 (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 85 (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 86 (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 87 (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 90 (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 91 (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 92 (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 93 (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.