not every text file a text file?

Dave Cragg dcragg at lacscentre.co.uk
Mon Apr 19 12:01:36 EDT 2004


At 11:34 pm +0800 19/4/04, Friedrich F. Grohmann wrote:
>I've been trying to work with the "read from file" command (Rev 2.1.2 on
>a G4 PowerBook with OS 10.3.2). The file involved was produced in Nisus
>Writer Express and saved as text. Nothing happened despite all attempts
>to "improve" the script including "get URL". I finally copied the text
>into a TextEdit file and it worked.
>
>Does this mean that not all text files will be recognized by Rev? Why
>TextEdit but not NWE?

I can read text files created by Nisus Writer Express in both Rev 
2.1.2 and 2.2. The following scripts both work here:

on mouseUp
   answer file ""
   if it is not empty then
     put url ("file:" & it) into field 1
   end if
end mouseUp

on mouseUp
   answer file ""
   if it is not empty then
     put it into tFile
     open file tFile
     read from file tFile until eof
     put it into field 1
     close file tFile
   end if
end mouseUp

Are there any non-ASCII characters in the file name? There was a 
thread on file name issues recently. I didn't follow in detail, but 
it's all I can think of that might be causing problems.

Cheers
Dave


More information about the use-livecode mailing list