file IO

TerribleTrioJoe's picture

I think this has been mentioned before, but just making sure.

in the FileIO API,
writeLine(string filename, string content, int lineNumber) // over writes specified line in file "filename" with content

--TTJ, owner of The Hacking Agency

TerribleTrioJoe's picture

SOLVED

Well guys, my post got me to thinking, and I realized that with the new additions to the API, I was not as limited as I once was. That being said / thought, I have now successfully programmed a writeLine(string filename, string content, int line) function that overWrites the specified line, as opposed to adding a line at the end of the file. If you would like this code, just send me a message ingame (if Im offline you can use the Mail Me function on my site (011.028.1.990). Thanks again to the devs for fixing up the scripting language!

- TTJ (CEO and owner of The Hacking Agency)

-TTJ

replacing a line of a file


Well guys, my post got me to thinking, and I realized that with the new additions to the API, I was not as limited as I once was.

You were limited?

Limits do not exist [...]

I wrote today a version which does that the old way - meaning only using the old API without arrays. But is doesn't work perfect yet. It has troubles with the last line and line numbers beyond the limit. I'll fix that - after some sleep. In every other case it work(s/ed).

TerribleTrioJoe's picture

replacing file line

Well, yes thats the quote from EN, but I am not in EN, still I realized after that I could do it with old HackScript too.

Happy Scripting everyone!

-TTJ (CEO and owner of The Hacking Agency )

-TTJ