home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Electronic Whole Earth Catalog
/
ElectronicWholeEarthCatalog.img
/
INTRODUCTION
/
background_17551.txt
< prev
next >
Wrap
Text File
|
1989-02-08
|
23KB
|
1,023 lines
-- background: 17551 from stack: in
-- bmap block id: 19479
-- 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 18 (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 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 25 (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 29 (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 30 (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 32 (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 33 (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 34 (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 35 (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 36 (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 37 (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 38 (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 39 (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 40 (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 41 (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 42 (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 43 (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 44 (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 45 (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 46 (field)
-- low flags: 81
-- 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 47 (field)
-- low flags: 81
-- 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 48 (field)
-- low flags: 81
-- 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 49 (field)
-- low flags: 81
-- 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 50 (field)
-- low flags: 81
-- 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 51 (field)
-- low flags: 81
-- 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 52 (field)
-- low flags: 81
-- 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 53 (field)
-- low flags: 81
-- 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 54 (field)
-- low flags: 81
-- 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 55 (field)
-- low flags: 81
-- 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 56 (field)
-- low flags: 81
-- 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 57 (field)
-- low flags: 81
-- 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 58 (field)
-- low flags: 81
-- 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 59 (field)
-- low flags: 81
-- 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 60 (field)
-- low flags: 81
-- 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 61 (field)
-- low flags: 81
-- 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 62 (field)
-- low flags: 81
-- 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 63 (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 64 (field)
-- low flags: 81
-- 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 65 (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 67 (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 68 (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 69 (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 70 (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 71 (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 72 (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