Hi Everyone,
i've a (maybe simple) problem and may just need a slap from anyone of you![;)]()
I get crazy with this simple part of my Script..:
$diff1 = "24"
$hours = FileRead("C:\Users\sx40211\desktop\Header\Stundencounter.txt")
$counted = FileReadLine("C:\Users\sx40211\desktop\Header\Stundencounter.txt", 1)
$Counter = FileOpen("C:\Users\sx40211\desktop\Header\Stundencounter.txt", 2)
FileWriteLine($Counter, StringReplace($hours, $counted, $counted+$diff1))
FileClose($Counter)
$datefile = FileRead("C:\Users\sx40211\desktop\Header\Datum.txt")
$altdatum = FileReadLine("C:\Users\sx40211\destktop\Header\Datum.txt", 1)
FileClose($datefile)
$newdatum = FileOpen("C:\Users\sx40211\desktop\Header\Datum.txt", 2)
FileWriteLine($newdatum, StringReplace($datefile, $altdatum, $date8))
FileClose($newdatum)
Maybe you can see what i try to do... the first part of the script is working well.. but the second part don't do what i whant him to do ^^
I would like to overwrite some text in a specific text-file.. but insteed of overwriting the text with the value wich hase $date8 given, he just overwrite it with empty letters.. or just delete it, call it what ever you want ^^
can anyone tell me what i'm doing wrong?
Thank you very much in advance!
i've a (maybe simple) problem and may just need a slap from anyone of you
![;)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/wink.png)
I get crazy with this simple part of my Script..:
$diff1 = "24"
$hours = FileRead("C:\Users\sx40211\desktop\Header\Stundencounter.txt")
$counted = FileReadLine("C:\Users\sx40211\desktop\Header\Stundencounter.txt", 1)
$Counter = FileOpen("C:\Users\sx40211\desktop\Header\Stundencounter.txt", 2)
FileWriteLine($Counter, StringReplace($hours, $counted, $counted+$diff1))
FileClose($Counter)
$datefile = FileRead("C:\Users\sx40211\desktop\Header\Datum.txt")
$altdatum = FileReadLine("C:\Users\sx40211\destktop\Header\Datum.txt", 1)
FileClose($datefile)
$newdatum = FileOpen("C:\Users\sx40211\desktop\Header\Datum.txt", 2)
FileWriteLine($newdatum, StringReplace($datefile, $altdatum, $date8))
FileClose($newdatum)
Maybe you can see what i try to do... the first part of the script is working well.. but the second part don't do what i whant him to do ^^
I would like to overwrite some text in a specific text-file.. but insteed of overwriting the text with the value wich hase $date8 given, he just overwrite it with empty letters.. or just delete it, call it what ever you want ^^
can anyone tell me what i'm doing wrong?
Thank you very much in advance!