delete end chars

Richmond richmondmathewson at gmail.com
Sun Aug 24 18:01:20 CEST 2014


On 24/08/14 18:54, JB wrote:
> Hi Richmond,
>
> That seems to leave me with the string I want to delete.
> Even so thank you for the code.
>
> John Balgenorth
>
>
> On Aug 24, 2014, at 8:46 AM, Richmond <richmondmathewson at gmail.com> wrote:
>
>> on mouseUp
>>    put fld "TEXXT" into TEXXT
>>    put the number of chars in TEXXT into CHNMB
>>    repeat CHNMB times
>>       if the last char of TEXXT is "A" then
>>          delete the last char of TEXXT
>>       end if
>>        if the last char of TEXXT is "B" then
>>          delete the last char of TEXXT
>>       end if
>>        if the last char of TEXXT is "C" then
>>          delete the last char of TEXXT
>>       end if
>>       put TEXXT into fld "TEXXT"
>>    end repeat
>> end mouseUp
>

I thought you wanted to 'snip' specific letters off the end of a chain 
of letter.

Iff that is what you wanted, that script will do that.

Richmond.



More information about the use-livecode mailing list