#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" 1 tPalette on preOpenStack --set the style of me to palette end preOpenStack on openStack open stack "myBook" end openStack on closeStack save this stack end closeStack on openMyBook put the num of this cd of stack "myBook" &" / "& \ the num of cds of stack "myBook" into fld "tPage" of stack "myBook" end openMyBook function jpAnswer pTag, pFldName, pCdNum, pWdName get ("get the text of fld "& pFldName &" of cd "& pCdNum & "of wd "& pWdName) do it get the htmlText of line (lineOffset(pTag, IT) + 1) to (lineOffset("/"& pTag, IT) -1) \ of fld pFldName of cd pCdNum of wd pWdName return replaceText(IT, "
", " ") end jpAnswer function englishTag return "" end englishTag K T My Palette U Lucida Grande U ,japanese U Osaka,Japanese U Lucida Grande U Osaka,Japanese U Geneva U Lucida Grande U Osaka U Osaka U geneva,english U ,japanese cREVGeneral scriptChecksum n\poly]Ⱥ debugObjects bookmarks handlerList @preOpenStack openStack closeStack openMyBook jpAnswer englishTagscriptSelection char 21 to 20prevHandler closeStacktempScript script \on preOpenStack
--set the style of me to palette
end preOpenStack
on openStack
open stack "myBook"
end openStack
on closeStack
save this stack
end closeStack
on openMyBook
put the num of this cd of stack "myBook" &" / "& \
the num of cds of stack "myBook" into fld "tPage" of stack "myBook"
end openMyBook
function jpAnswer pTag, pFldName, pCdNum, pWdName
get ("get the text of fld "& pFldName &" of cd "& pCdNum & "of wd "& pWdName)
do it
get the htmlText of line (lineOffset(pTag, IT) + 1) to (lineOffset("/"& pTag, IT) -1) \
of fld pFldName of cd pCdNum of wd pWdName
return replaceText(IT, "</p>", " ")
end jpAnswer
function englishTag
return "<font face=Geneva size=12>"
end englishTag
Pon winStandalone --if environment()&& platform() is "development MacOS" then if environment()&& platform() is "standalone application Win32" then answer information jpAnswer(winAppli, jpText, 2, tPalette) exit to top end if end winStandalone T cREVGeneral scriptChecksum ] _/fv bookmarks handlerList winStandalonescriptSelection char 216 to 215prevHandler winStandalonetempScript scripton winStandalone
--if environment()&& platform() is "development MacOS" then
if environment()&& platform() is "standalone application Win32" then
answer information jpAnswer(winAppli, jpText, 2, tPalette)
exit to top
end if
end winStandalone
" # % & ' @ newCard e Ion mouseUp set the defaultStack to "myBook" create card end mouseUp ~ e0W0D0000O\0 cREVGeneral scriptChecksum YU! [CR'%revUniqueID 1085250334325 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 72 to 71scripton mouseUp
set the defaultStack to "myBook"
create card
end mouseUp
deleteCard e !on mouseUp if the num of cds of stack "myBook">1 then set the defaultStack to "myBook" put the num of this cd of stack "myBook" into tPageNum lock screen delete this card open cd tPageNum-1 of stack "myBook" openMyBook else beep end if end mouseUp K ~ 0S0n0000RJd cREVGeneral scriptChecksum h-}kXKrevUniqueID 1085250987311 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 194 to 193scripton mouseUp
if the num of cds of stack "myBook">1 then
set the defaultStack to "myBook"
put the num of this cd of stack "myBook" into tPageNum
lock screen
delete this card
open cd tPageNum-1 of stack "myBook"
openMyBook
else
beep
end if
end mouseUp
saveMyBook e on mouseUp ask file "" with "myStack.rev" if it is not "Cancel" then put it into tPath lock screen clone stack "myBook" set the name of stack "copy of myBook" to "myStack" save stack "myStack" as tPath delete stack "myStack" end if end mouseUp { ~ 00000k0W0fO[X cREVGeneral scriptChecksum C`revUniqueID 1085252740823 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 275 to 274scripton mouseUp
ask file "" with "myStack.rev"
if it is not "Cancel" then
put it into tPath
lock screen
clone stack "myBook"
set the name of stack "copy of myBook" to "myStack"
save stack "myStack" as tPath
delete stack "myStack"
end if
end mouseUp
jpText3 f cREVGeneral revUniqueID 1085252978101 0000 myBook"0 jpText2 6 cREVGeneral revUniqueID 1085252740822 0000 myBook"0n jpText1 cREVGeneral bookmarks revUniqueID 1085250954194handlerList scriptSelection char 1 to 0prevHandler tempScript script 0000 myBook"0k backToDefault e on mouseUp repeat with i = the number of cards of stack "myBook" down to 2 delete card i of stack "myBook" end repeat get the num of images of stack "myBook" if it >0 then delete image 1 of stack "myBook" openMyBook save stack "myBook" end mouseUp ~ 000000n0000k cREVGeneral scriptChecksum KWfks0urevUniqueID 1085255814266 bookmarks handlerList mouseUptempScript prevHandler mouseUpscriptSelection char 265 to 264scripton mouseUp
repeat with i = the number of cards of stack "myBook" down to 2
delete card i of stack "myBook"
end repeat
get the num of images of stack "myBook"
if it >0 then delete image 1 of stack "myBook"
openMyBook
save stack "myBook"
end mouseUp
jpText4 cREVGeneral revUniqueID 1085255814267 0000 myBook"0 tools i~on mouseUp set the borderWidth of the target to 2 put the short name of the target into tTool switch tTool case "browse" choose browse tool break case "Magnifier" winStandalone if the num of images of stack "myBook" is 0 then beep answer information jpAnswer(paintFirst, jpText, 2, tPalette) exit to top end if choose pencil tool set the magnify of image 1 of cd 1 of stack "myBook" to true set the penColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette" break case "pencil" choose pencil tool set the penColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette" break case "brush" winStandalone choose brush tool set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette" break case "bucket" choose bucket tool set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette" break case "eraser" winStandalone choose eraser tool break case "spray can" winStandalone choose spray can tool set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette" break end switch if tTool is "Magnifier" then set the loc of grc "selected" to the loc of image "pencil" else set the loc of grc "selected" to the loc of the target end if end mouseUp % cREVGeneral scriptChecksum ;QzB5q-XbreakPoints handlerList mouseUpscriptSelection char 1288 to 1287revUniqueID 1085256799663 bookmarks tempScript prevHandler mouseDownscripton mouseUp
set the borderWidth of the target to 2
put the short name of the target into tTool
switch tTool
case "browse"
choose browse tool
break
case "Magnifier"
winStandalone
if the num of images of stack "myBook" is 0 then
beep
answer information jpAnswer(paintFirst, jpText, 2, tPalette)
exit to top
end if
choose pencil tool
set the magnify of image 1 of cd 1 of stack "myBook" to true
set the penColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette"
break
case "pencil"
choose pencil tool
set the penColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette"
break
case "brush"
winStandalone
choose brush tool
set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette"
break
case "bucket"
choose bucket tool
set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette"
break
case "eraser"
winStandalone
choose eraser tool
break
case "spray can"
winStandalone
choose spray can tool
set the brushColor to the backgroundColor of grc "tColor" of cd 1 of stack "tPalette"
break
end switch
if tTool is "Magnifier" then
set the loc of grc "selected" to the loc of image "pencil"
else
set the loc of grc "selected" to the loc of the target
end if
end mouseUp
browse @ Browse Tool GIF89a eee ! , hܾ@8!0DĠѲJl)pv4nCpD r;TE:`7u *e{E/9mf{qFkumqg;#$9{fQ !qof :[zfeW$# ; cREVGeneral bookmarks revUniqueID 1084397780322handlerList scriptSelection char 1 to 0prevHandler tempScript script bucket @ T Bucket Tool GIF89a ggg"""! , ܾ ASD yG$,k ڲ,@8@aPzRSg6(y,7@nڰrP!sRc0$3?wK}^=z$W>J~i+wI~<\y gQ}~e//~+sw'Vͧ ; cREVGeneral bookmarks revUniqueID 1084397792248handlerList scriptSelection char 1 to 0prevHandler tempScript script eraser @ l Eraser Tool GIF89a VVVeee! , Xܾ@8D(Ǡjp-.6E:܂R2"[`hì8џJb7JЄt\VQDŽ҆^w<bv{xy|/zmhoEAYA< ; cREVGeneral revUniqueID 1084397802330 bookmarks handlerList tempScript prevHandler scriptSelection char 1 to 0script spray can @ Spray Can Tool GIF89a iii! , Hܾa(X;DPU&hy_M[jx~LKZ @%*< @H9S"v