Gene Posted November 25, 2005 Share Posted November 25, 2005 I have used red strike thru text to show what I think is a problem and brown bold text to show a possible solution.FileOpen --------------------------------------------------------------------------------Opens a text file for reading or writing.FileOpen ( "filename", mode )Parameters"filename" Filename of the text file to open. mode Mode (read or write) to open the file in.Can be a combination of the following: 0 = Read mode 1 = Write mode (append to end of file) 2 = Write mode (erase previous contents) 4 = Read raw mode 8 = Create directory structure if it doesn't exist (See Remarks).Both write modes will create the file if it does not already exist but a non existent folder (except using mode '8' - See Remarks). but a non existent folder will not be created (unless mode '8' is used - See Remarks).Return ValueSuccess: Returns a file "handle" or use with subsequent file functions. Failure: Returns -1 if error occurs. RemarksUp to 64 files can be open simultaneously by one AutoIt script. Exceeding this limit throws a run-time error andA file can only be in either read or write mode; it cannot be in both.When opening a file in write mode, the file will be created if it does not exist.When finished working with a file, call the FileClose function to close the file. Autoit normally closes all files upon termination, but explicitly calling FileClose is still a good idea.When using the mode=4 (Raw Read) the filename is defined as "\\.\A:" for reading sector on a floppy disk the count must be a multiple of sector size(512). (I don't have a suggestion for the part in Italics, I think it should be examined by someone who both understands the message as well as having English as a first language. Note: NO PART of this posting is intended to be hurtful or insulting!)None existing directory structure:Non-existing------------------------------------By default the file will not be created if the directory structure doesn't exist.To overwrite this behaviour use the modes '1' and '2' together with mode-flag '8'!For instance the mode-flag '9' (1 + 8) checks for the directory structure and if it doesn't exist creates it automatically and then opens the file for appending. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
Gene Posted November 27, 2005 Author Share Posted November 27, 2005 H'mmmn, I was hoping someone would have responded to this by now, Oh, well, even though it's been 2 days, "A watched pot" and other old sayings. 'til next time. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now