KXM Posted August 26, 2005 Posted August 26, 2005 Should this line of code work? $sBug = 'Test' _FileWriteLog('\\server\data\yagsi\Bin\BUG.log', $sBug) Or does AutoIt not support this?
seandisanti Posted August 26, 2005 Posted August 26, 2005 Should this line of code work?$sBug = 'Test'_FileWriteLog('\\server\data\yagsi\Bin\BUG.log', $sBug)Or does AutoIt not support this?<{POST_SNAPBACK}>i'd say do it like this...$file = FileOpen("\\server\data\yagsi\bin\bug.log",1) $sBug = "test" FileWriteLine($file, $sBug) FileClose($file)
KXM Posted August 26, 2005 Author Posted August 26, 2005 Thanks for the fast reply... As it turns out, I forgot to set write permissions. That being said, _FileWriteLog will work correctly with UNC. THNX!
Valuater Posted August 26, 2005 Posted August 26, 2005 (edited) i'd say do it like this...$file = FileOpen("\\server\data\yagsi\bin\bug.log",1) $sBug = "test" FileWriteLine($file, $sBug) FileClose($file)<{POST_SNAPBACK}>I saw this the other day also and decided not to mention ithttp://www.autoitscript.com/forum/index.php?showtopic=13881#but especially for this thread.. the _FileWriteLog, which i use quite often, also places the date and time in the line of text added, per help_FileWriteLog --------------------------------------------------------------------------------Writes current date,time and the specified text to a log file.this is very helpful and may replace the need for @MON & @MDAY & @YEAR Additionally, there is no need for file open or file closeMaybe you weren't aware of this feature when you suggested the above post to KXManyways, I see you've been busy here helping others... and thats greatEnjoy!Robert M8) Edited August 26, 2005 by Valuater
seandisanti Posted September 8, 2005 Posted September 8, 2005 I saw this the other day also and decided not to mention ithttp://www.autoitscript.com/forum/index.php?showtopic=13881#but especially for this thread.. the _FileWriteLog, which i use quite often, also places the date and time in the line of text added, per helpthis is very helpful and may replace the need for @MON & @MDAY & @YEAR Additionally, there is no need for file open or file closeMaybe you weren't aware of this feature when you suggested the above post to KXManyways, I see you've been busy here helping others... and thats greatEnjoy!Robert M8)<{POST_SNAPBACK}>Thanks for the info, you're right i wasn't particularly familiar with the _FileWriteLog, most of my scripts are for doing things right now, and i need to know about success or failure each step of the way at runtime. So i don't typically have any need to write a log file. definitely a cool function to know about incase i ever do though.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now