I am using "setPref" and "getPref" and I would like to check if a text file
is present in my system. Specifically in your OS drive (system folder).
I was using someone's code that they had given me, but it doesn't seem to
work.
on exitFrame
set theFile = getPref(getOSDirectory() & "gehfs.txt")
if voidP(theFile) then
set the visibility of sprite 30 = FALSE
fileObj = new(xtra "fileIO")
createFile(fileObj, getOSDirectory() & "gehfs.txt")
openFile(fileObj, getOSDirectory() & "gehfs.txt",0)
set theContents = "trash me"
-- write the list to text file
writeString(fileObj, string(theContents))
-- close the text file
closeFile(fileObj)
fileObj = 0
else
set the visibility of sprite 30 = TRUE
beep
end if
end
just a note. When this is run, and there is a text file in the OS
directory called "gehfs.txt" it won't beep. This leads me to believe that
I am missing a step. Please help. Thank you.
Conrad Ayala
Interface Architect
The Spin Group, Inc.
http://www.spingroup.com/
Phone 1-414-672-8888 Fax 1-414-672-8183
[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!]