Spaced Out
Richmond
richmondmathewson at gmail.com
Sun Sep 5 07:57:24 EDT 2010
Cracked It!
And a right "@#$%^" it is too . . . :(
>> Running a detection script like this:
>>
>> on mouseUp
>> set the useUnicode to true
>> put the word 4 of the selectedChunk into W4
>> put (W4 - 1) into W5
>> get charToNum(char W5 to W4 of fld "MyGuff")
>> put it into UNIK
>> put the word 2 of the selectedChunk into W2
>> put (W2 - 1) into W!
>> get charToNumber(char W2 to W1 of fld "MyGuff")
>> put it into UNIQ
>> put uniEncode("The insertion point is between '") into P1
>> put uniEncode("' and '") into P2
>> put uniEncode("'") into P3
>> set the unicodeText of fld "WhereAreWe" to P1& numToChar(UNIK)& P2& numToChar(UNIQ)& P3
>> end mouseUp
>>
>>
>> detects a SPACE when the insertion point is BEFORE the space, but
>>
>> does NOT detect a SPACE when the insertion point is AFTER a space.
>>
>
to detect a SPACE one has to TURN OFF useUnicode:
set the useUnicode to false
put the word 4 of the selectedChunk into WONKY
get charToNum(char WONKY of fld "MyGuff")
put it
set the useUnicode to true
"somebody", cough, cough, ought to get all this sorted out in the
Documentation.
More information about the use-livecode
mailing list