Jump to content

filewrite


legend
 Share

Recommended Posts

Something like:

#include <Constants.au3>
 
;I will write a line first.
FileWrite("mkish.txt", "My name is MKISH")
$CONTENT = FileRead("mkish.txt")

; Now, I will add something before that line.
$hFile = FileOpen("mkish.txt", 1)
FileSetPos($hFile, 0, $FILE_BEGIN)
FileWrite($hFile, "I wrote." & $CONTENT)
FileClose($hFile)

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

something sort of like that :) the thing is

the thing is, It writes to the same line, if there already exists a line.

1.

2. this line already existslMy name is MKISH

3.

while instead it should do it like this

1. My name is MKISH

2. this line already exists

3.

Edited by legend
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...