Am I missing something simple here? I wrote a little utility to copy the 
script text out to text files, and it crashes my Mac on about the 15th 
iteration.

on copyScripts castLibName, targetDir
   repeat with i = 1 to the number of members of castlib (castLibName)
     if member(i, castLibName).type  = #script then
       theFile = 0
       theFile = new (xtra "fileio")
       theFileName = member(i, castLibName).name & ".txt"
       theText = member(i, castLibName).scriptText
       createFile(theFile, targetDir & theFileName)
       openFile(theFile, targetDir & theFileName, 0)
       writeString(theFile, theText)
       closeFile(theFile)
     end if
   end repeat
end

It's a movie script, and I'm calling it from the message window:
copyScripts ("Scripts", "Freddy Kruger:In Development:HMProject:Scripts 
(Demo):")

It successfully writes out about 20 files, then crashes to the debugger. 
Maybe I'm too tired.


Cordially,

Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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