#!/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 2 7on 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 a x U Osaka,Japanese U Osaka U Osaka,Japanese U Lucida Grande U Lucida Grande,Japanese U Lucida Grande U helvetica @ jpTargetFld )x \on mouseUp put clickLine() &cr& clickChar() &cr& clickCharChunk() into fld 2 end mouseUp $ cREVGeneral scriptChecksum qQ*bܕ bookmarks revUniqueID 1049930590290handlerList mouseUpscriptSelection char 18 to 17prevHandler mouseUptempScript script
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~0Y0K0 fBR;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?0LN N0Ys0nz0hN 0W00kk0U00f0D0_0n0o00S0D0d0nNim0`0h0Ku30W0f\E00~0W0_0 _13) 0]0ngk0kNW0c0f0D0_Ys00N 0S0D0d0L0B0nu70k0W0_0h0j00p00i0S0x0i0F0W0_0K00K00~0[00 @ Red > 914) ]Q0L0~0W00F0T0V0D0~0Y0L00]00_npN0U0D0~0W0 4 ` @ ! Field 2 )h 8 $ b cREVGeneral revUniqueID 1050331193464 914) ]Q0L0~0W00F0T0V0D0~0Y0L00]00_npN0U0D0~0W0 4 ` @ K ` Button 1 ew lon mouseUp put the unicodetext of fld 1 into tdata put countUnicodeLines(tdata) into fld 2 end mouseUp 9 n )put the num of lines of fld 1 into fld 2 cREVGeneral scriptChecksum KWA2J)rӂ bookmarks revUniqueID 1050347816318handlerList mouseUpscriptSelection char 54 to 53prevHandler mouseUptempScript scripton mouseUp
put the num of lines of fld 1 into fld 2
end mouseUp
Button 1 ew on 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 ;)l Cset the unicodeText of fld 2 to the line 5 of unicodeText of fld 1 cREVGeneral scriptChecksum VкG5