deltaepsylon Posted July 2, 2007 Share Posted July 2, 2007 (edited) I have tried everything i can think of, and ive looked thru the help but i dont really know where to look. Anyways, im trying to write the following to a text file someone "[variable goes here]" But I cant get the quotes to write! Im using FileWriteLine FileWriteLine (@ScriptDir&"\out.txt", "someone ""&$var&""" ) ;the error is here ---------------------------^ ------^ ;because there is an unclosed quote How can I get FileWriteLine to write out the quote? Edited July 2, 2007 by deltaepsylon Link to comment Share on other sites More sharing options...
Developers Jos Posted July 2, 2007 Developers Share Posted July 2, 2007 (edited) FileWriteLine (@ScriptDir&"\out.txt", "someone """ & $var & """" ) -or - FileWriteLine (@ScriptDir&"\out.txt", 'someone "' & $var & '"' ) Edited July 2, 2007 by JdeB 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...
Josbe Posted July 2, 2007 Share Posted July 2, 2007 I have tried everything i can think of, and ive looked thru the help but i dont really know where to look. Anyways, im trying to write the following to a text file someone "[variable goes here]" But I cant get the quotes to write! Im using FileWriteLine FileWriteLine (@ScriptDir&"\out.txt", "someone ""&$var&""" ) ;the error is here ---------------------------^ ------^ ;because there is an unclosed quote How can I get FileWriteLine to write out the quote?Check FAQ #7. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
deltaepsylon Posted July 2, 2007 Author Share Posted July 2, 2007 (edited) FileWriteLine (@ScriptDir&"\out.txt", "someone """ & $var & """" )-or -FileWriteLine (@ScriptDir&"\out.txt", 'someone "' & $var & '"' )That gave me the error "Unterminated String"Edit: The first one err'd, the second one worked perfectly. Thanks! Edited July 2, 2007 by deltaepsylon 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