Jump to content
Sign in to follow this  
Guest Foamfollower

_FileWriteLog

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

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.