home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Electronic Whole Earth Catalog
/
ElectronicWholeEarthCatalog.img
/
HEALTH
/
background_4934.txt
< prev
next >
Wrap
Text File
|
1989-02-07
|
23KB
|
1,023 lines
-- background: 4934 from stack: in
-- bmap block id: 14737
-- flags: 0000
-- background id: 0
-- name: Access
----- HyperTalk script -----
-- bg Access script 2/7/89
on initAccUpdate
-- called by 'openStack' in stack script
-- open access update and update index files
loadAccUpdate "EWEC Update", "EWEC.update", "ewec.update.index"
end initAccUpdate
on exitAccUpdate
-- called by 'closeStack' in stack script
closeAccUpdate
end exitAccUpdate
on openCard
doAccUpdate
pass openCard
end openCard
-- access update routines
-- all these routines require the accUpdate XFCN
-- doAccUpdate requires pullTabbedChunk XFCN (or function)
on doAccUpdate
-- if an access update file has been opened, this function
-- checks for an update to this card and updates fields accordingly
global tabbedData -- used by pullTabbedChunk function
global updHandle
if updHandle is not 0 then
if field surveyAccession is empty
then get lookupUpdate( field "accession" )
else get lookupUpdate( field "surveyAccession" )
if it is not empty then
lock screen
put "x" into field beenUpdated
put it into tabbedData
put pullTabbedChunk() into field "theTitle"
put pullTabbedChunk() into field "theSubTitle"
put pullTabbedChunk() into field "vendorName"
put pullTabbedChunk() into field "vendorAddr1"
put pullTabbedChunk() into field "vendorPhone"
put tabbedData into field "theAccess"
unlock screen
end if
end if
end doAccUpdate
function lookupUpdate theAccession
global updHandle
return accUpdate( 2, updHandle, theAccession )
end lookupUpdate
on loadAccUpdate diskName, dataFileName, indexFileName
-- loads a prebuilt access index file, opens data file
-- looks in HyperCard directory as well as the named disk
global updHandle
global stacks -- list of stack folders from home stack
-- look in HC directory first, it's probably a hard disk
put accUpdate( 4, indexFileName, dataFileName ) into updHandle
if updHandle = 0 then
-- not found, so look in named disk
put accUpdate( 4, diskName & ":" & indexFileName, diskName & ":" & dataFileName ) into updHandle
-- disabled search of "stacks" folder list
-- reenable by removing "AND false" clause
if updHandle = 0 AND false then
-- still not found, look thru folder list from home stack
if stacks is empty then
getHomeInfo -- Std. Home stack script that fills in global variables
end if
put 1 into lineNum
put the number of lines of stacks into lc
repeat while updHandle = 0 and lineNum <= lc
put lc - lineNum
put line lineNum of stacks into diskName
put accUpdate( 4, diskName & indexFileName, diskName & dataFileName ) into updHandle
put diskName & indexFileName
add 1 to lineNum
end repeat
end if
end if
end loadAccUpdate
on closeAccUpdate
global updHandle
get accUpdate( 3, updHandle )
put 0 into updHandle
end closeAccUpdate
-- **** end of access update scripts ****
-- access update build scripts (not used in product )
on updPrepare fName
-- builds access update index from text file
global updHandle
put accUpdate( 1, fName ) into updHandle
end updPrepare
on updWrite theAccession
-- writes access update index to a file that loadAccUpdate can read
global updHandle
put "ewec.update.index" into fileName
-- open and close the file, just to be sure it exists
open file fileName
close file fileName
return accUpdate( 5, updHandle, fileName )
end updWrite
-- **** end of access update build scripts ****
-- part 4 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=34 top=85 right=313 bottom=210
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: theAccess
-- part 5 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=354 top=318 right=338 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 15
-- part name: thePage
-- part 6 (field)
-- low flags: 81
-- high flags: 4002
-- rect: left=255 top=0 right=18 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: theIdent
-- part 20 (field)
-- low flags: 01
-- high flags: 2000
-- rect: left=28 top=40 right=64 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 768
-- line height: 18
-- part name: theTitle
-- part 22 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=345 top=22 right=41 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: theHeading
----- HyperTalk script -----
on mouseDown
popMenuArticle
end mouseDown
-- part 26 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=423 top=317 right=338 bottom=453
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Down
----- HyperTalk script -----
on mouseUp
doArticleDownButton
end mouseUp
-- part 27 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=353 top=317 right=338 bottom=386
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Up
----- HyperTalk script -----
on mouseUp
doArticleUpButton
end mouseUp
-- part 30 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=463 top=88 right=130 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Earth
----- HyperTalk script -----
on mouseUp
goWholeEarth
end mouseUp
-- part 31 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=463 top=139 right=173 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Map
----- HyperTalk script -----
on mouseUp
doArticleMapButton
end mouseUp
-- part 34 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=0 top=172 right=232 bottom=165
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Popup
-- part 37 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=0 top=0 right=18 bottom=86
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Accession
-- part 42 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=170 top=0 right=18 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: SurveyAccession
-- part 70 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=463 top=232 right=275 bottom=488
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Left
----- HyperTalk script -----
on mouseUp
doArticleLeftButton
end mouseUp
-- part 71 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=482 top=184 right=230 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Right
----- HyperTalk script -----
on mouseUp
doArticleRightButton
end mouseUp
-- part 72 (field)
-- low flags: 01
-- high flags: 2000
-- rect: left=28 top=59 right=81 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: theSubtitle
-- part 117 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=245 top=18 right=36 bottom=361
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ISBN
-- part 118 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=373 top=14 right=63 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: keyWords
-- part 120 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=73 top=85 right=117 bottom=237
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: RealSubtitle
-- part 121 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=307 top=61 right=87 bottom=497
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: longTitle
-- part 122 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=307 top=86 right=113 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: authorName
-- part 123 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=307 top=112 right=127 bottom=503
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: authorIndexed
-- part 124 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=307 top=123 right=152 bottom=399
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: pubYear
-- part 126 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=307 top=152 right=189 bottom=454
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: price
-- part 127 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=433 top=144 right=191 bottom=499
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: ppd$
-- part 128 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=307 top=185 right=219 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: vendorName
-- part 129 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=309 top=204 right=250 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: vendorAddr1
-- part 130 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=309 top=248 right=275 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: vendorPhone
-- part 131 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=310 top=266 right=282 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: originatorName
-- part 132 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=310 top=282 right=298 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: reviewerName
-- part 133 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=310 top=298 right=314 bottom=346
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: book
-- part 134 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=348 top=298 right=314 bottom=384
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: bookPage
-- part 135 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=386 top=298 right=314 bottom=422
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: articleType
-- part 136 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=425 top=298 right=313 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: domain
-- part 138 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=316 top=327 right=340 bottom=331
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 12
-- style flags: 256
-- line height: 13
-- part name: WEA?
-- part 139 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=230 top=312 right=342 bottom=303
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: publicityphone
-- part 140 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=33 top=271 right=308 bottom=289
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: misc
-- part 147 (field)
-- low flags: 83
-- high flags: 0002
-- rect: left=443 top=127 right=145 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 11
-- part name: pages
-- part 154 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=4 top=313 right=328 bottom=79
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Pic
----- HyperTalk script -----
on mouseUp
show Card picture
end mouseUp
-- part 155 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=4 top=327 right=342 bottom=77
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hide Pic
----- HyperTalk script -----
on mouseUp
hide Card picture
end mouseUp
-- part 159 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=410 top=128 right=143 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: MapDest
-- part 160 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=410 top=272 right=287 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: LeftDest
-- part 161 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=410 top=225 right=240 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: RightDest
-- part 162 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=354 top=285 right=300 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: UpDest
-- part 163 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=354 top=301 right=316 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: DownDest
-- part 164 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=163 top=172 right=232 bottom=277
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: PopupDest
-- part 167 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=79 top=312 right=327 bottom=223
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Fields
----- HyperTalk script -----
on mouseUp
lock screen
show bg field "ISBN"
show bg field "keywords"
show bg field "longtitle"
show bg field "realsubtitle"
show bg field "authorname"
show bg field "authorindexed"
show bg field "pubyear"
show bg field "pages"
show bg field "price"
show bg field "ppd$"
show bg field "vendorname"
show bg field "vendoraddr1"
show bg field "vendorphone"
show bg field "originatorname"
show bg field "reviewername"
show bg field "book"
show bg field "bookpage"
show bg field "articletype"
show bg field "domain"
show bg field "WEA?"
show bg field "publicityphone"
show bg field "misc"
unlock screen
end mouseUp
-- part 168 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=79 top=327 right=342 bottom=224
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Hide Fields
----- HyperTalk script -----
on mouseUp
lock screen
hide bg field "ISBN"
hide bg field "keywords"
hide bg field "longtitle"
hide bg field "realsubtitle"
hide bg field "authorname"
hide bg field "authorindexed"
hide bg field "pubyear"
hide bg field "pages"
hide bg field "price"
hide bg field "ppd$"
hide bg field "vendorname"
hide bg field "vendoraddr1"
hide bg field "vendorphone"
hide bg field "originatorname"
hide bg field "reviewername"
hide bg field "book"
hide bg field "bookpage"
hide bg field "articletype"
hide bg field "domain"
hide bg field "WEA?"
hide bg field "publicityphone"
hide bg field "misc"
unlock screen
end mouseUp
-- part 169 (button)
-- low flags: 80
-- high flags: 8003
-- rect: left=0 top=291 right=313 bottom=100
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Pour Access
----- HyperTalk script -----
on mouseUp
pourAccess
send mouseUp to bg btn "Hide Fields"
end mouseUp
on pourAccess
put empty into accessInfo
-- take care of the title
put fld "realSubTitle" into realSubTitle
put fld "longTitle" into longTitle
if realSubTitle is not empty then
put stripCR(realSubTitle) & Return after accessInfo
else if fld "longTitle" is not empty then
put stripCR(longTitle) & Return after accessInfo
else
--put Return after accessInfo
end if
-- now the author name
if fld "authorName" is not empty then
put stripCR(fld "authorName") & Return after accessInfo
end if
-- publication year and number of pages
put fld "pubYear" into pubYear
put fld "pages" into pages
if pubYear is not empty AND pages is not empty then
put stripCR(pubYear) & ";" && stripCR(pages) & Return after accessInfo
else if fld "pubYear" is not empty AND fld "pages" is empty then
put stripCR(pubYear) & Return after accessInfo
else if fld "pubYear" is empty AND fld "pages" is not empty then
put stripCR(pages) & Return after accessInfo
end if
-- ISBN
put fld "ISBN" into ISBN
if ISBN is not empty then
if fld "articleType" = "pr" then
put "ISSN" && stripCR(ISBN) & Return after accessInfo
else -- if fld "articleType" = "br" then
put "ISBN" && stripCR(ISBN) & Return after accessInfo
end if
end if
-- Price
put fld "price" into price
put fld "ppd$" into ppd
if price is not empty AND ppd is not empty then
put stripCR(price) && stripCR(ppd) after accessInfo
else if price is not empty AND ppd is empty then
put price after accessInfo
else if price is empty AND ppd is not empty then
put ppd after accessInfo
end if
put Return after accessInfo
-- vendor
if fld "vendorName" is not empty then
put "from:" & Return & Return & stripCR(fld "vendorName") & Return after accessInfo
end if
if fld "vendorAddr1" is not empty then
put stripCR(fld "vendorAddr1") & Return after accessInfo
end if
if fld "vendorPhone" is not empty then
put stripCR(fld "vendorPhone") & Return after accessInfo
end if
-- Misc
if fld "misc" is not empty then
put Return & stripCR(fld "misc") & Return after accessInfo
end if
put accessInfo into fld "theAccess"
end pourAccess
function stripCR theInfo
repeat forever
if last char of theInfo is " " OR last char of theInfo is Return then
delete last char of theInfo
else
exit repeat
end if
end repeat
return theInfo
end stripCR
function hasBgButton what
repeat with i = 1 to number of bg buttons
if short name of bg button i = what then return true
end repeat
return false
end hasBgButton
on slagBgButtons btnName
repeat while hasBgButton(btnName) is true
show bg btn btnName
select bg btn btnName
doMenu "Clear Button"
end repeat
end slagBgButtons
-- part 170 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=0 top=324 right=342 bottom=16
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: beenUpdated