not every text file a text file?
Sarah Reichelt
sarahr at genesearch.com.au
Tue Apr 20 22:54:25 EDT 2004
> I followed their suggestion with
> "answer file" and, lo and behold, I can access NWE files. Thanks for
> broadening my horizon!
>
> Unfortunately, in practical terms, "answer file" would not work for my
> specific needs at the moment. I hope to be able to display text which
> can
> be directly read from a file without interrupting the process of going
> from card to card.
The only function of the "answer file" was to get the correct file path
for your text document. Once you see how the file path was put
together, you can use that or a similar path in a script and not ask
the user anything unless the file is missing.
-- file selection routine called once only
-- it stores the file path in a custom property
on findFilePath
answer file
if it is not empty then set the cStoredFilePath of me to it
end findFilePath
-- regular scripted handler to read the file
on readFile
put the cStoredFilePath of me into tFile
if there is not a file tFile then findFilePath
put URL ("file:" & tFile) into fld "Text"
end readFile
Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/
More information about the use-livecode
mailing list