#!/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 "$@" createSubstack "on openStack unIconifyStack get the text of of btn "tDeco" of cd 1 if the platform is "Win32" then replace "title,close,minimize" with "title,menu,close,minimize" in it replace "title,close,maximize" with "title,menu,close,maximize" in it if the last line of it is "metal" then delete last line of it set the text of btn "tDeco" of cd 1 to it else replace "title,menu,close,minimize" with "title,close,minimize" in it replace "title,menu,close,maximize" with "title,close,maximize" in it if the last line of it is not "metal" then put cr& "metal" after it set the text of btn "tDeco" of cd 1 to it end if end openStack on unIconifyStack put the substacks of this stack into tStacks if tStacks >0 then sort tStacks repeat with i=1 to the num of lines of tStacks put line i of tStacks into tSubStack put line i of tStacks &cr after putOut toplevel tSubStack set the style of stack tSubStack to the label of stack tSubStack wait 10 end repeat end if end unIconifyStack l,, Create Substack U Lucida Grande U ,japanese U Lucida Grande U ,japanese U Osaka,Japanese U Osaka,Japanese U ms sans serif cREVGeneral scriptChecksum 3*=:#C bookmarks handlerList openStack unIconifyStacktempScript prevHandler openStackscriptSelection char 662 to 661script
on openStack
unIconifyStack
get the text of of btn "tDeco" of cd 1
if the platform is "Win32" then
replace "title,close,minimize" with "title,menu,close,minimize" in it
replace "title,close,maximize" with "title,menu,close,maximize" in it
if the last line of it is "metal" then delete last line of it
set the text of btn "tDeco" of cd 1 to it
else
replace "title,menu,close,minimize" with "title,close,minimize" in it
replace "title,menu,close,maximize" with "title,close,maximize" in it
if the last line of it is not "metal" then put cr& "metal" after it
set the text of btn "tDeco" of cd 1 to it
end if
end openStack
on unIconifyStack
put the substacks of this stack into tStacks
if tStacks >0 then
sort tStacks
repeat with i=1 to the num of lines of tStacks
put line i of tStacks into tSubStack
put line i of tStacks &cr after putOut
toplevel tSubStack
set the style of stack tSubStack to the label of stack tSubStack
wait 10
end repeat
end if
end unIconifyStack
@ ,, cREVGeneral bookmarks handlerList scriptSelection char 1 to 0prevHandler tempScript script jText cREVGeneral revUniqueID 1081642471995 00000000x0v createNewSub e on mouseUp put tNum() into N copy fld "jComment" create stack("Sub_" & N) set the mainstack of stack("Sub_" & N) to "createSubstack" set the script of cd 1 of stack("Sub_" & N) to deleteStack() if N is 1 then set the loc of stack("Sub_" & N) to (item 1 of the topLeft of \ stack "createSubstack" + (the width of stack("Sub_" & N) /2) + 22 ),\ (item 2 of the topLeft of stack "createSubstack" + (the height of stack("Sub_" & N)/2) + 84) else set the loc of stack ("Sub_" & N) to (item 1 of the topLeft of \ stack("Sub_" & N-1) + (the width of stack("Sub_" & N)/2) + 10), \ (item 2 of the topLeft of stack("Sub_" & N-1) + (the height of stack("Sub_" & N)/2) + 26) end if unIconifyStack switch (the label of btn "tDeco") case "empty" set the decorations of stack("Sub_" & N) to empty break case "metal" set the decorations of stack("Sub_" & N) to "default" set the metal of stack("Sub_" & N) to true break default set the decorations of stack("Sub_" & N) to (the label of btn "tDeco") break end switch set the label of stack("Sub_" & N) to (the label of btn "tDeco") open cd 1 of stack("Sub_" & N) paste set the loc of fld "jComment" to the width of stack("Sub_" & N)/2 +5, the height of stack("Sub_" & N)/2 -20 show fld "jComment" end mouseUp function deleteStack return "on mouseDoubleUp" &cr& " delete this stack" &cr& "end mouseDoubleUp" &cr&cr& \ "on closeCard" &cr& " if the metal of this stack then set the alwaysbuffer of this stack to false" &cr&\ " delete this stack" &cr& "end closeCard" end deleteStack function tNum put the substacks of this stack into tStacks replace "Sub_" with "" tStacks repeat with i=1 to the num of lines of tStacks put i into N if line i of tStacks is not i then return N exit tNum end if end repeat return (N +1) end tNum 0000000000000Y0 cREVGeneral scriptChecksum dXy>'VzcOt bookmarks revUniqueID 1081629625186handlerList mouseUp deleteStack tNumscriptSelection char 729 to 728prevHandler deleteStacktempScript script @on mouseUp
put tNum() into N
copy fld "jComment"
create stack("Sub_" & N)
set the mainstack of stack("Sub_" & N) to "createSubstack"
set the script of cd 1 of stack("Sub_" & N) to deleteStack()
if N is 1 then
set the loc of stack("Sub_" & N) to (item 1 of the topLeft of \
stack "createSubstack" + (the width of stack("Sub_" & N) /2) + 22 ),\
(item 2 of the topLeft of stack "createSubstack" + (the height of stack("Sub_" & N)/2) + 84)
else
set the loc of stack ("Sub_" & N) to (item 1 of the topLeft of \
stack("Sub_" & N-1) + (the width of stack("Sub_" & N)/2) + 10), \
(item 2 of the topLeft of stack("Sub_" & N-1) + (the height of stack("Sub_" & N)/2) + 26)
end if
unIconifyStack
switch (the label of btn "tDeco")
case "empty"
set the decorations of stack("Sub_" & N) to empty
break
case "metal"
set the decorations of stack("Sub_" & N) to "default"
set the metal of stack("Sub_" & N) to true
break
default
set the decorations of stack("Sub_" & N) to (the label of btn "tDeco")
break
end switch
set the label of stack("Sub_" & N) to (the label of btn "tDeco")
open cd 1 of stack("Sub_" & N)
paste
set the loc of fld "jComment" to the width of stack("Sub_" & N)/2 +5, the height of stack("Sub_" & N)/2 -20
show fld "jComment"
end mouseUp
function deleteStack
return "on mouseDoubleUp" &cr& " delete this stack" &cr& "end mouseDoubleUp" &cr&cr& \
"on closeCard" &cr& " if the metal of this stack then set the alwaysbuffer of this stack to false" &cr&\
" delete this stack" &cr& "end closeCard"
end deleteStack
function tNum
put the substacks of this stack into tStacks
replace "Sub_" with "" tStacks
repeat with i=1 to the num of lines of tStacks
put i into N
if line i of tStacks is not i then
return N
exit tNum
end if
end repeat
return (N +1)
end tNum
jComment @ 9 Y z cREVGeneral revUniqueID 1081681966507 O\000_0000000o0 00000000K 0000000X00S0h0g 00000K000000U00~0Y tDeco m default Cdefault title,close,minimize title,close,maximize menu empty metal cREVGeneral bookmarks revUniqueID 1081641961021handlerList scriptSelection char 1 to 0prevHandler tempScript script