Jump to content

How do i open a textfile for writing some text?


Recommended Posts

Im trying to at the end of my script open a textfile located on my desktop and write some info about what the script has done.

I can open a new instance of notepad and get it to enter the info like this:

Run("Notepad.exe")
WinWaitActive("Untitled - Notepad")
Send('Starttid: ' & $starttime & @CR & 'Antal gjorda länkbyten: ' & $Number & @CR & 'Sluttid: ' & _DateTimeFormat( _NowCalc(),0) & @CR & @CR)
WinWaitNotActive("Untitled - Notepad")

But i want it to open the file on my desktop instead and start writing at the bottom. The file is called "loggbok.txt" and is located at "C:\Documents and Settings\Bill\Desktop"

Any ideas guys?

//Bill

Link to comment
Share on other sites

take a look at this

_FileWriteLog Writes current date,time and the specified text to a log file.

#include <File.au3>

_FileWriteLog ( $sLogPath, $sLogMsg )

Parameters

$sFilePath Path and filename of the file to be written to $sLogMsg Message to be written to the log file

8)

NEWHeader1.png

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...