Mat Posted March 12, 2009 Share Posted March 12, 2009 (edited) I want to write a line to a file that includes quote marks. how should it be done? I want to write something along the lines of: Filewrite ("="text and stuff" " & @CRLF & "="more text and stuff" ", 1) Question no 2 Whats the difference between filewrite and filewriteline I presume Filewrite accepts @CRLF ???? MDiesel Edited March 12, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 Like so: $var = "=""text and stuff"" " Or .. $var = '="text and stuff" ' FileWrite is to write anything to a file. FileWriteLine can only add one line to the end of a file. FileWriteLine is a function for those that are lazy. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Mat Posted March 12, 2009 Author Share Posted March 12, 2009 $var = "=""text and stuff"" " or$var = '="text and stuff" 'so what do i do if I intend to do alot of quotation marks in lots of different areas?Thanks for the replyMDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 Whichever method you use, be consistent in what you do. Either are fine. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Mat Posted March 12, 2009 Author Share Posted March 12, 2009 What I should have said is: What If I dont want to make lots of variables? I am probably going to end up using 30+ variables trying to do this. could I... set $SM = " " " Then I could just use the one variable over and over again. Filewrite ("=" & $SM & "text and stuff" & $SM & " & @CRLF & "=" & $SM & "more text and stuff" & $SM, 1) lol MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 Haha. True, but not very useful. $SM = """" ( value = " ) github.com/jvanegmond Link to comment Share on other sites More sharing options...
weaponx Posted March 12, 2009 Share Posted March 12, 2009 Just use single quotes around the double quotes. No problem here. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2009 Developers Share Posted March 12, 2009 FileWrite is to write anything to a file. FileWriteLine can only add one line to the end of a file.FileWriteLine is a function for those that are lazy.I would have said: They are exactly the same except FileWriteLine() adds an @CRLF at the end of the written string.Jos 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...
Mat Posted March 12, 2009 Author Share Posted March 12, 2009 Thanks for the info Manadar - I'll work something out!!! MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 I would have said: They are exactly the same except FileWriteLine() adds an @CRLF at the end of the written string.But I think that would be entirely correct because of when dealing with binary data. The help file says that FileWriteLine does not accept null characters. I don't see a purpose for FileWriteLine when we already had FileWrite, anyway.And sometimes I feel like I am blindly defending what is in the help file... github.com/jvanegmond 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