magOO Posted March 12, 2004 Share Posted March 12, 2004 Hello!I add some text via FileWriteLine. But now i want to write a " in the Text.AutoIt stop the script and says that there is a an error.Can anybody please explain, how i can write a " in a File?ThanksmagOO Link to comment Share on other sites More sharing options...
jpm Posted March 12, 2004 Share Posted March 12, 2004 Hello!I add some text via FileWriteLine. But now i want to write a " in the Text.AutoIt stop the script and says that there is a an error.Can anybody please explain, how i can write a " in a File?ThanksmagOOFilewriteLine("filename", '"')certainly difficult to read it is a ' followed by " followed by '.That second manner to protect string.THe idea is when you need one inside you use the other to protect Link to comment Share on other sites More sharing options...
Bartokv Posted March 12, 2004 Share Posted March 12, 2004 Since quotes can be tricky, I tend to use Chr(34) to insert double quotes: FileWriteLine($FileHandle, "Quoted text follows: " & Chr(34) & "Hello" & Chr(34)) Guess there's always more than one way to swing a dead cat. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2004 Developers Share Posted March 12, 2004 (edited) Guess there's always more than one way to swing a dead cat. yeap, and this way will also work: """" but i prefer JPM's way... '"' Edited March 12, 2004 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...
scriptkitty Posted March 12, 2004 Share Posted March 12, 2004 If you forget chr(): $q='"' $q2="'" MsgBox(1,"...and he said",$q2&"Quotes are fun" & $q2 &@CRLF& $q &"Quite fun" &$q) AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
magOO Posted March 13, 2004 Author Share Posted March 13, 2004 Thanks To All For Your Help! 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