onedayillpay Posted November 10, 2006 Posted November 10, 2006 #include <File.au3> _FileWriteToLine("C:\Program Files\Steam\steamapps\francescaklinger\counter-strike\cstrike\cfgfuck.cfg", 3, "my replacement for line 3", ) i have a file in my cstrike folder calld "cfgfuck.cfg" and i dont understand why that line of code wont work...maybe the file has to be .txt format
stampy Posted November 11, 2006 Posted November 11, 2006 except for the comma at the end i was able to make it work. (of course i tested a different directory) #include <File.au3> _FileWriteToLine("C:\Program Files\Steam\steamapps\francescaklinger\counter-strike\cstrike\cfgfuck.cfg", 3, "my replacement for line 3" )
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 except for the comma at the end i was able to make it work. (of course i tested a different directory) #include <File.au3> _FileWriteToLine("C:\Program Files\Steam\steamapps\francescaklinger\counter-strike\cstrike\cfgfuck.cfg", 3, "my replacement for line 3" ) what comma?
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 #include <File.au3> _FileWriteToLine("C:\Program Files\Steam\steamapps\francescaklinger\counter-strike\cstrike\cfgfuck.cfg", 3, "my replacement for line 3",1) o yah...i ment to post this likne of code i want to replace line 3
stampy Posted November 11, 2006 Posted November 11, 2006 code still works for me. what kind of error are you getting? it just doesn't do anything? or error?
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 it just does nothing...even the the _filewritetoline in the help file does nothing
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 its realy starting to piss me off i unistalld and reinstalld and still the _filewritetoline located in the help folder dont work
xcal Posted November 11, 2006 Posted November 11, 2006 You could try something like... #include <File.au3> $file = 'C:\Program Files\Steam\steamapps\francescaklinger\counter-strike\cstrike\cfgfuck.cfg' Dim $array _FileReadToArray($file, $array) $array[3] = 'my replacement for line 3' _FileWriteFromArray($file, $array, 1) (Just add in some error checking.) How To Ask Questions The Smart Way
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 (edited) still dont work... ok im just going to use fileWrite now im getting some were but how do you filewrite this key " i need to add this line to the cfgfile amx_nick "2134235" "testname" but how do you filewrite this key " ------------------example-code--------------------------- $target = InputBox("cfgfuck", "Enter steamID", "", "") $file = FileOpen("cfgfuck.cfg", 2) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, "amx_nick " & $target & " testname" ) FileWrite($file, "") FileWrite($file, "") FileClose($file) Edited November 11, 2006 by onedayillpay
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 so how do you send the key " to a txt file using filewrite
stampy Posted November 11, 2006 Posted November 11, 2006 so how do you send the key " to a txt file using filewritedouble them up or use single quotes around it. Check the FAQ in the help file, it's explained in there.
onedayillpay Posted November 11, 2006 Author Posted November 11, 2006 (edited) send("+'") works if you want to send " but im trying to filewrite that key FileWrite($file, ' " ') FileWrite($file, """"""""""""""""""""""""""""""""""""""""""Frustrated) ok i got it it takes four filewrite(" " " ") gadamn y was that not in the read me Edited November 11, 2006 by onedayillpay
Richard Robertson Posted November 11, 2006 Posted November 11, 2006 "This is a string with ""double quotes"" in it." -or- 'This is a string with "double quotes" in it.' Read the help file.
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