home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
hypercrd
/
hc1_2_x
/
tshirts.sit
/
T-Shirts
/
card_12246.txt
< prev
next >
Wrap
Text File
|
1990-09-13
|
10KB
|
439 lines
-- card: 12246 from stack: in
-- bmap block id: 12396
-- flags: 0000
-- background id: 6796
-- name:
----- HyperTalk script -----
on opencard
repeat with i = 3 to 9
get field 3 of card i
put it into card field i
end repeat
end opencard
on closecard
repeat with i = 3 to 9
get card field i
put it into field 3 of card i
end repeat
end closecard
-- part 1 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=479 top=315 right=342 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
visual effect iris close
pop card
end mouseUp
-- part 5 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=16 top=235 right=320 bottom=269
-- 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: maddr
-- part 6 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=80 top=188 right=205 bottom=108
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShirtSize
-- part 7 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=370 top=259 right=283 bottom=482
-- 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: Print Order
----- HyperTalk script -----
function checkquant
repeat with i = 3 to 9
repeat with j = 1 to the length of card field i
get character j of card field i
if (it<"0") or (it>"9") then
if (it=".") then
answer "Quantity must be an integer"
select text of card field i
return false
exit checkquant
else if (it="-") then
answer "Quantity must be positive"
select text of card field i
return false
exit checkquant
else if (it="O") then -- the letter "O"
put "0" into character j of card field i
else if (it="l") then -- the letter "L"
put "1" into character j of card field i
else
answer "Quantity must be a number"
select text of card field i
return false
exit checkquant
end if
end if
end repeat
end repeat
return true
end checkquant
function checksize
get card field ShirtSize
if it="" then
answer "Please enter the size"
select text of card field 2
return false
else if not ((it is "S") or (it is "s") or (it is "M") or (it is "m") or (it is "L") or (it is "L") or (it is "XL") or (it is "xl")) then
answer "Size must be S,M,L,or XL"
select text of card field 2
return false
else
return true
end if
end checksize
function checkaddr
get card field maddr
if it="" then
answer "Please enter mailing address"
select text of card field maddr
return false
else
return true
end if
end checkaddr
on copy2nextcard
put card field maddr into card field maddr of next card
put card field maddr into card field cmaddr of next card
put card field ShirtSize into card field ShirtSize of next card
put card field ShirtSize into card field CShirtSize of next card
put card field usrcomment into card field usrcomment of next card
repeat with i = 3 to 9
get card field i
put it into card field i of next card
put it into card field (i+10) of next card
end repeat
end copy2nextcard
on calccost
put "--" into card field cost
put "--" into card field stax
put "--" into card field shipc
put "--" into card field totc
put 0 into card field totq
repeat with i = 3 to 9
put (card field totq +card field i) into card field totq
end repeat
if card field totq=0 then
else
put (card field totq)*12+2 into card field cost
put card field cost into card field totc
if hilite of card button inny of previous card then
put 0.07 * card field totc into card field stax
put card field stax + card field totc into card field totc
put "$" & card field stax into card field stax
end if
put 3.75 into card field shipc
put card field shipc + card field totc into card field totc
put "$" & card field cost & ".00" into card field cost
put "$" & card field shipc into card field shipc
put "$" & card field totc into card field totc
end if
end calccost
on mouseUp
if checkquant() then
if checksize() then
if checkaddr() then
copy2nextcard
go to next card
calccost
if card field totq=0 then
answer "You haven't ordered anything!"
else
print card
end if
go to previous card
end if
end if
end if
end mouseUp
-- part 9 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=51 right=68 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 10 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=69 right=86 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 11 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=87 right=104 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 12 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=105 right=122 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 13 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=123 right=140 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 14 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=141 right=158 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 15 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=59 top=159 right=176 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 27 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=320 top=54 right=217 bottom=498
-- 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: usrcomment
-- part 29 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=127 top=186 right=208 bottom=150
-- 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: S
----- HyperTalk script -----
on mouseUp
put "S" into card field shirtsize
end mouseUp
-- part 30 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=157 top=186 right=208 bottom=180
-- 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: M
----- HyperTalk script -----
on mouseUp
put "M" into card field shirtsize
end mouseUp
-- part 31 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=185 top=186 right=208 bottom=208
-- 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: L
----- HyperTalk script -----
on mouseUp
put "L" into card field shirtsize
end mouseUp
-- part 32 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=228 top=186 right=208 bottom=251
-- 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: XL
----- HyperTalk script -----
on mouseUp
put "XL" into card field shirtsize
end mouseUp
-- part 33 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=162 top=126 right=178 bottom=294
-- 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:
-- part 34 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=462 top=28 right=50 bottom=484
-- 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:
----- HyperTalk script -----
on mouseUp
visual effect iris open
go to card id 2207
end mouseUp
-- part 36 (button)
-- low flags: 00
-- high flags: 6005
-- rect: left=39 top=320 right=338 bottom=58
-- 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: inNY
-- part contents for card part 33
----- text -----
If you want more than one shirt size, print a separate order for each size.