Jump to content

_FileWriteLog


Guest Foamfollower
 Share

Recommended Posts

Guest Foamfollower

I am trying to get a log file to write using the _FilewriteLog function but am having no success. Has anyone else had a problem with this? I am a new writer and there is a good chance that I have written it incorrectly. I would appreciate it if someone could look at it for errors.

;Create a log file

#include File.au3

Dim $cmptnme = @ComputerName

Dim $sLogPath = "c:\instlog\sitelog.txt"

Dim $sLogMsg = "Installation completed on Outlook Client"

Func _FileWriteLog ($sLogPath, $sMsg )

EndFunc

Thanks, Foamfollower :D

Link to comment
Share on other sites

  • Developers

#include <File.au3>
Dim $cmptnme = @ComputerName
Dim $sLogPath = "c:\instlog\sitelog.txt"
Dim $sLogMsg = "Installation completed on Outlook Client"
_FileWriteLog ($sLogPath, $sMsg )

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest Foamfollower

Thanks for the direction. I ended up with this:

; Create a log file#include <File.au3>

Local $sDateNow

Local $sTimeNow

Local $hOpenFile

Local $hWriteFile

Dim $sLogMsg = "Installation completed on Outlook Client"

Dim $sDateTimeNow = @ComputerName & "*****" & @YEAR & "-" & @MON & "-" & @MDAY & "-" & @Hour & ":" & @MIN & ":" & @SEC & ":" & $sLogMsg

Dim $sLogPath = "c:\instlog\sitelog.txt"

_FileWriteLog ($sLogPath, $sDateTimeNow )

exit

The date repeats but I will work that out :D

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