about how many lines of code they wrote

on countLines
  nrLines = 0
  nrScripts = 0
  nMems = 0
  nC=_movie.castlib.count
  t=_system.milliseconds
  repeat with n=1 to nC
    nMembers=_movie.castlib[n].member.count
    nMems=nMems+nMembers
    repeat with o=1 to nMembers
      if _movie.castlib[n].member[o].type=#script then
        nrScripts = nrScripts + 1
        lCount=_movie.castlib[n].member[o].script.text.line.count
        repeat with m=1 to lCount

-- comment this IF statement out if you want to count emtpy lines as well
          if _movie.castlib[n].member[o].script.text.line[m]<>"" then

            nrLines=nrLines+1

-- and if you comment it out, don't forget thisone as well... :)
          end if
        end repeat
      end if
    end repeat
  end repeat
  t=( _system.milliseconds-t )/1000.0000
return "Counted "&nrLines&" lines of code in "&nrScripts&" scripts. Searched "&nC&" casts, containing "&nMems&" castmembers in total. Search took "&t&" seconds to complete."
end
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to