is among - problem

jbv jbv.silences at Club-Internet.fr
Fri Nov 21 17:30:47 EST 2003



Mark,

Try the following script (it's not very elegant,
but it works - haven't tested it thoroughly though) :

Hope that helps,
JB


on mouseUp
  set cursor to watch
  put fld "myList" into L
  put "" into S
  put 0 into n
  repeat with j=1 to (number of lines of L)-1
    get line j of L
    put char 1 of it into a
    put char 2 of it into b
    put char 3 of it into c
    repeat with i=j+1 to (number of lines of L)
      get line i of L
      if (a is in it) and (b is in it) and (c is in it) then
        add 1 to n
        put i into item n of S
      end if
    end repeat
  end repeat

  sort items of S descending numeric
  repeat with i=(number of items of S)down to 2
    if item i of S=item (i-1) of S then
      delete item i of S
    end if
  end repeat
  repeat with i=1 to number of items of S
    delete line i of L
  end repeat
  put L into fld "myList"
end mouseUp






More information about the use-livecode mailing list