van_renier Posted August 19, 2005 Posted August 19, 2005 I am successfully opening a file and writing about 30 lines to it. However, during the writing, I'm trying to put an @ symbol in the file and ALL attempts have failed. The original attempt which was noticed to fail was at the END of the line; FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774@" & $a ) I even tried writing multiple ones at multiple locations in the file; FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN @@ @ @ @ @@@@ awm_qiksoc 7774@" & $a ) the only way I was able to get the @ in the file was via using the Chr() function; FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774" & Chr(064) & $a ) Is this a bug or a new requirement? I had an older version of Au3 installed on my system ( v3.0.1.2 or something like that) and recently installed v3.1.1 and noticed that since then, as it did work in the/a previous Au3 version. Thanks, Van Renier
Holger Posted August 19, 2005 Posted August 19, 2005 (edited) Please give more details about your problem, for instance a test-script which on your PC fails, also the OS would be usefull. I have tested it here under 95 and XPSP2 with Version 3.1.1 and 3.1.1.68Beta and it works OK. So I can't see any bugs here. Does the following test script works on your PC? $OpenQuick_CFG_File = FileOpen(@ScriptDir & "\test.txt", 1) ; Check if file opened for writing OK If $OpenQuick_CFG_File = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $a = "XYZ1234" FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774@" & $a ) FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN @@ @ @ @ @@@@ awm_qiksoc 7774@" & $a ) FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774" & Chr(064) & $a ) FileClose($OpenQuick_CFG_File) If it works then maybe your script have a problem. Regards Holger Edited August 19, 2005 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
van_renier Posted August 19, 2005 Author Posted August 19, 2005 (edited) Holger,Thanks for your input. I did check your submitted script and it works fine. So it's not the Au3 install files, but it still occurs in this script of mine. It was working at one point, and the only thing I can remember doing since it was working was install the v3.1.1 release.<Many lines of now-outdated babble deleted..... I've found the cause>Opt ( "ExpandVarStrings", 1 )A single @ when the above variable is set causes nothing to be written.However, More than a single @ next to each other does cause output (but only a single output character. Trying to output the following line; PLUGIN @@ @ @ @ @@@@ awm_qiksoc 7774@If the Option is set to 0 you get it verbatim; PLUGIN @@ @ @ @ @@@@ awm_qiksoc 7774@But if it is set to 1 this is the result; PLUGIN @ @What's REALLY odd though, is the "awm_qiksoc 7774" doesn't get in there at all!Thanks for the help and assistance in this!VanPlease give more details about your problem, for instance a test-script which on your PC fails, also the OS would be usefull.I have tested it here under 95 and XPSP2 with Version 3.1.1 and 3.1.1.68Beta and it works OK.So I can't see any bugs here.Does the following test script works on your PC?$OpenQuick_CFG_File = FileOpen(@ScriptDir & "\test.txt", 1) ; Check if file opened for writing OK If $OpenQuick_CFG_File = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $a = "XYZ1234" FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774@" & $a ) FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN @@ @ @ @ @@@@ awm_qiksoc 7774@" & $a ) FileWriteLine ( $OpenQuick_CFG_File , "PLUGIN awm_qiksoc 7774" & Chr(064) & $a ) FileClose($OpenQuick_CFG_File)If it works then maybe your script have a problem.RegardsHolger<{POST_SNAPBACK}> Edited August 19, 2005 by van_renier
Nutster Posted August 20, 2005 Posted August 20, 2005 According to the documentation:ExpandVarStrings Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., "The value of var1 is $var1$".1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: "This is a single dollar $$ sign".0 = do not expand variables (default)When outputting a literal string with $ or @ in it, it is best to turn off this option. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd...
jpm Posted September 1, 2005 Posted September 1, 2005 as it is not a bug I move it to support so you can discuss if needed
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