miketh2005 Posted August 18, 2009 Share Posted August 18, 2009 This is my code: $file = FileOpen(@MyDocumentsDir & "sfp.ini", 1) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, "Line1") FileWriteLine($file, "Line2" & @CRLF) FileWriteLine($file, "Line3") FileClose($file) I went to My Documents and it's not showing up, although I get no error message. Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 18, 2009 Share Posted August 18, 2009 (edited) @MyDocuments, as well as other directory macros, do not contain a \ on the end. You have to add it yourself. "\sfp.ini" The file you made was at "C:\Documents and Settings\[user]\My Documentssfp.ini". I assume you use XP because Vista would have popped up on UAC trying to do something like that. Edited August 18, 2009 by Richard Robertson Link to comment Share on other sites More sharing options...
Developers Jos Posted August 18, 2009 Developers Share Posted August 18, 2009 You forgot a slash between the directoryname and the filename on your fileopen() statement so guess you are looking on the wrong place? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
miketh2005 Posted August 18, 2009 Author Share Posted August 18, 2009 Oh, ok, thanks, guys >_ 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