#!/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 "$@"  Untitled 3Pfunction countUnicodeLines @tdata put number of characters of tdata into tlength set useunicode to true put 1 into tlinecount repeat with i = 1 to tlength step 2 if chartonum(char i to i+1 of tdata) is 10 then add 1 to tlinecount end repeat return tlinecount end countUnicodeLines function UnicodeLineOffset @tdata,whichline put number of characters of tdata into tlength set useunicode to true put 1 into tlinecount put 1 into tlineoffset repeat with i = 1 to tlength step 2 if tlinecount is whichline then exit repeat if chartonum(char i to i+1 of tdata) is 10 then add 1 to tlinecount put i+2 into tlineoffset end if end repeat if whichline > tlinecount then put tlength + 1 into tlineoffset return tlineoffset end UnicodeLineOffset function unicodeLineNum pFldname put the unicodetext of fld pFldname into tUnicodeText return countUnicodeLines(tUnicodeText) end unicodeLineNum function unicodeThisLine pFldname, pStart put the unicodetext of fld pFldname into tUnicodeText put UnicodeLineOffset(tUnicodeText,pStart) into startchar put UnicodeLineOffset(tUnicodeText,pStart+1) - 1 into endchar return (char startchar to endchar of tUnicodeText) end unicodeThisLine function unicodeLineToLine pFldname, pStart, pEnd put the unicodetext of fld pFldname into tdata put UnicodeLineOffset(tdata,pStart) into startchar put UnicodeLineOffset(tdata,pEnd+1) - 1 into endchar return (char startchar to endchar of tdata) end unicodeLineToLine hd{e[u ULucida Grande,Japanese ULucida Grande UOsaka,Japanese U ,Japanese U ,Japanese ULucida Grande UOsaka,Japanese ULucida Grande,Japanese U Osaka,utf8 cREVGeneralscriptChecksum#yF0{4y bookmarks handlerListTcountUnicodeLines UnicodeLineOffset unicodeLineNum unicodeThisLine unicodeLineToLine tempScript prevHandlerscriptSelectionchar 255 to 254stackfileversionscript)

function countUnicodeLines @tdata

put number of characters of tdata into tlength

set useunicode to true

put 1 into tlinecount

repeat with i = 1 to tlength step 2

if chartonum(char i to i+1 of tdata) is 10 then add 1 to tlinecount

end repeat

return tlinecount

end countUnicodeLines

function UnicodeLineOffset @tdata,whichline

put number of characters of tdata into tlength

set useunicode to true

put 1 into tlinecount

put 1 into tlineoffset

repeat with i = 1 to tlength step 2

if tlinecount is whichline then exit repeat

if chartonum(char i to i+1 of tdata) is 10 then

add 1 to tlinecount

put i+2 into tlineoffset

end if

end repeat

if whichline > tlinecount then put tlength + 1 into tlineoffset

return tlineoffset

end UnicodeLineOffset

function unicodeLineNum pFldname

put the unicodetext of fld pFldname into tUnicodeText

return countUnicodeLines(tUnicodeText)

end unicodeLineNum

function unicodeThisLine pFldname, pStart

put the unicodetext of fld pFldname into tUnicodeText

put UnicodeLineOffset(tUnicodeText,pStart) into startchar

put UnicodeLineOffset(tUnicodeText,pStart+1) - 1 into endchar

return (char startchar to endchar of tUnicodeText)

end unicodeThisLine

function unicodeLineToLine pFldname, pStart, pEnd

put the unicodetext of fld pFldname into tdata

put UnicodeLineOffset(tdata,pStart) into startchar

put UnicodeLineOffset(tdata,pEnd+1) - 1 into endchar

return (char startchar to endchar of tdata)

end unicodeLineToLine

 @ jpTable)k$DL< cREVGeneral revUniqueID 1143933680947  `WJ tInput)h x.6 cREVGeneral revUniqueID 1143933769316  0B0D0F,0K0M0O,0U0W0Y,0_0a0dN         0D,0,,0o0kR ,0{0x0h         0K0M0O,0U0W0Y,0_0a      Buttonexon mouseUp get the unicodeText of fld "tInput" replace uniencode(comma) with uniencode(tab) in it set the textfont of fld "jpTable" to "Osaka,utf8" set the unicodeText of fld "jpTable" to it end mouseUp $00000keg,0000 cREVGeneralscriptChecksum$ :ih4 revUniqueID 1143933802868 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 212 to 211script%

on mouseUp

get the unicodeText of fld "tInput"

replace uniencode(comma) with uniencode(tab) in it

set the textfont of fld "jpTable" to "Osaka,utf8"

set the unicodeText of fld "jpTable" to it

end mouseUp

 tReplace)h cREVGeneral revUniqueID 1143933822065  eg,  tCell)h cREVGeneral revUniqueID 1143933843213  1,2 Buttonexon mouseUp replaceCell jpTable, tReplace, tCell end mouseUp on replaceCell pTableField, pReplaceText, pCell repeat with i=1 to unicodeLineNum(pTableField) put urlEncode(unidecode(unicodeThisLine(pTableField,i), utf8)) &cr after tUrlTable end repeat replace urlEncode(tab) with comma in tUrlTable put item 1 of fld pCell into tColumn put item 2 of fld pCell into tRow put the num of items of line tRow of tUrlTable into tLastItem if tColumn = tLastItem then put urlEncode(unidecode(fld pReplaceText, utf8))&urlEncode(cr) into item tColumn of line tRow of tUrlTable else put urlEncode(unidecode(fld pReplaceText, utf8)) into item tColumn of line tRow of tUrlTable end if replace comma with urlEncode(tab) in tUrlTable repeat with i=1 to unicodeLineNum(pTableField) put urlDecode(line i of tUrlTable) after tNewTable end repeat set the unicodeText of fld "jpTable" to uniEncode(tNewTable,utf8) end replaceCell &D000]0Wf0H cREVGeneralscriptChecksumuї SUΨ revUniqueID 1143933855567 bookmarks handlerListmouseUp replaceCell tempScript prevHandlermouseUpscriptSelectionchar 954 to 953scripts

on mouseUp

replaceCell jpTable, tReplace, tCell

end mouseUp

on replaceCell pTableField, pReplaceText, pCell

repeat with i=1 to unicodeLineNum(pTableField)

put urlEncode(unidecode(unicodeThisLine(pTableField,i), utf8)) &cr after tUrlTable

end repeat

replace urlEncode(tab) with comma in tUrlTable

put item 1 of fld pCell into tColumn

put item 2 of fld pCell into tRow

put the num of items of line tRow of tUrlTable into tLastItem

if tColumn = tLastItem then

put urlEncode(unidecode(fld pReplaceText, utf8))&urlEncode(cr) into item tColumn of line tRow of tUrlTable

else

put urlEncode(unidecode(fld pReplaceText, utf8)) into item tColumn of line tRow of tUrlTable

end if

replace comma with urlEncode(tab) in tUrlTable

repeat with i=1 to unicodeLineNum(pTableField)

put urlDecode(line i of tUrlTable) after tNewTable

end repeat

set the unicodeText of fld "jpTable" to uniEncode(tNewTable,utf8)

end replaceCell

 Label Field 3d cREVTable currentview[

差し替え文:

 cREVGeneral revUniqueID 1143939093512 ]0Wf0He   Label Field v cREVTable currentview{

セル(コラム、ロウ)

 cREVGeneral revUniqueID 1143939135407 00000000 LineKJb cREVGeneral revUniqueID 1143939469589  Label Field h cREVTable currentviewby Kenji Kojima : cREVGeneral revUniqueID 1143939481010 by Kenji Kojima :  Label Field d cREVTable currentview Set Table cREVGeneral revUniqueID 1158616400459 Set Table  Label Field Dd cREVTable currentview Change Cell cREVGeneral revUniqueID 1158616427784 Change Cell