#!/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 27on mouseUp end mouseUp 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 ax UOsaka,Japanese UOsaka UOsaka,Japanese ULucida Grande ULucida Grande,Japanese ULucida GrandeU helvetica @  jpTargetFld)x\on mouseUp put clickLine() &cr& clickChar() &cr& clickCharChunk() into fld 2 end mouseUp $ cREVGeneralscriptChecksumqQ*bܕ bookmarks revUniqueID 1049930590290 handlerListmouseUpscriptSelection char 18 to 17 prevHandlermouseUp tempScriptscript

on mouseUp

put clickLine() &cr& clickChar() &cr& clickCharChunk() into fld 2

end mouseUp

 "1) i^UO0kUO000_0e>QM0nri   *2) 00_0W0Ld&0S0c0_u70g0T0V0D0~0Y0K0  & 3) 0S00ox0K0kYDN80hN0F0T 0DvN0g0T0V0D0~0Y000c0h000_0W0Ld&0S0c0_fB0k0o00K0=0a0_0n0g0T0V0D0~0W00F0|u0S0nwjK0nN 0k00F00F0T{0c0f\E00~0W0_0   @Red  :4) fBR;0g0T0V0D0~0Y0K0fBR;0of(Y0nRf0g0T0V0D0~0Y0  6 Z5) 0_0`N0o0]0n0{0K0k0_0n00N _w0n^0U0Hd:0H0f\E00~0Y00U00F0g0T0V0D0~0Y0K0   @Red# %4 \6) 0B0nk{0nu70Lc0c0f0D0_0n00  0g0oNk0W0P0D0_0n0o00S0nYDN80kU0D0T0V0D0~0[00  X 7) i0]0D0__0XW00n{00n0n_w0LSANg,0  0S00ov00B0nu70Lc0c0f0D0_00n0g0T0V0D0~0W00F00o0D000J0c0W0000l^+0ngk0g0T0V0D0~0Y0   8) 0]0nu\u0k=0U000h0o0OU0K0nV~0kU0D0T0V0D0~0[000]00owjK0n\0WQH0k0w0Dz}0_0D0_0~0~00p0_0nR00c0f\E00~0W0_0   9)  10)  F11)N0F00d0o0mN-0k__0Y0vN0nN-0g00YsY}0M0n00d0g0T0V0D0~0Y0  B 12)f(^t0ny˜[0nӘ-v0n_0n\q0k0ric0g0kge0_00W0DYsb?0LNN0Ys0nz0hN0W00kk0U00f0D0_0n0o00S0D0d0nNim0`0h0Ku30W0f\E00~0W0_0   _13) 0]0ngk0kNW0c0f0D0_Ys00N 0S0D0d0L0B0nu70k0W0_0h0j00p00i0S0x0i0F0W0_0K00K00~0[00   @Red  > 914) ]Q0L0~0W00F0T0V0D0~0Y0L00]00_npN 0U0D0~0W0  4 `@! Field 2)h8$b cREVGeneral revUniqueID 1050331193464  914) ]Q0L0~0W00F0T0V0D0~0Y0L00]00_npN 0U0D0~0W0  4`@K` Button 1ewlon mouseUp put the unicodetext of fld 1 into tdata put countUnicodeLines(tdata) into fld 2 end mouseUp 9n)put the num of lines of fld 1 into fld 2 cREVGeneralscriptChecksumKWA2J)rӂ bookmarks revUniqueID 1050347816318 handlerListmouseUpscriptSelection char 54 to 53 prevHandlermouseUp tempScriptscript

on mouseUp

put the num of lines of fld 1 into fld 2

end mouseUp

 Button 1ewon mouseUp put the unicodetext of fld 1 into tdata put UnicodeLineOffset(tdata,5) into startchar put UnicodeLineOffset(tdata,6) - 1 into endchar set the unicodeText of fld 2 to char startchar to endchar of tdata end mouseUp ;)lCset the unicodeText of fld 2 to the line 5 of unicodeText of fld 1 cREVGeneralscriptChecksumVкG5on mouseUp

set the unicodeText of fld 2 to the line 5 of unicodeText of fld 1

end mouseUp

 Button 1ew on mouseUp put the unicodetext of fld 1 into tdata put UnicodeLineOffset(tdata,14) into startchar put UnicodeLineOffset(tdata,15) - 1 into endchar set the unicodeText of fld 2 to char startchar to endchar of tdata end mouseUp 9l@set the unicodeText of fld 2 to line 14 of unicodeText of fld 1 cREVGeneralscriptChecksumܫa&Y8.`3q bookmarks revUniqueID 1050347816318 handlerListmouseUpscriptSelection char 89 to 88 prevHandlermouseUp tempScriptscript

on mouseUp

set the unicodeText of fld 2 to line 14 of unicodeText of fld 1

end mouseUp

Field 1 9tN cREVGeneral revUniqueID 1050380836498 There are 14 lines in field 1. .And field 1 contains four "000A" characters, you can see they are RED. Click a button. Field 1 ;T( cREVGeneral revUniqueID 1050380836498 &What number did you put into field 2. The number must be "14". Field 1 =CT* cREVGeneral revUniqueID 1050380836498 'I think you set line 4 into the feild. 6Because there is a "000A" character above the line 5. Button 1ewon mouseUp put the unicodetext of fld 1 into tdata put UnicodeLineOffset(tdata,6) into startchar put UnicodeLineOffset(tdata,7) - 1 into endchar set the unicodeText of fld 2 to char startchar to endchar of tdata end mouseUp 9klCset the unicodeText of fld 2 to the line 6 of unicodeText of fld 1 cREVGeneralscriptChecksumÊ^}Ő bookmarks revUniqueID 1050347816318 handlerListmouseUpscriptSelection char 80 to 79 prevHandlermouseUp tempScriptscript

on mouseUp

set the unicodeText of fld 2 to the line 6 of unicodeText of fld 1

end mouseUp

Field 1 ?T: cREVGeneral revUniqueID 1050380836498 3You could set a half of line 5 (NOT whole line 6). 0Because there is a "000A" character in line 3, and middle of line 5. Field 1 =T  cREVGeneral revUniqueID 1050380836498 *It must be the last line that is line 14.