AvN Posted October 9, 2009 Share Posted October 9, 2009 Hi there, Quick question: I am trying to come up with a script that read some data and create a txt log file for that. Say I have to read $temp1, $temp2,Temp3 from the script. How can I send it to the log file so that I can have it like this: Temperature1| Temperature2|Temperature3| $temp1 | $Temp2 |$Temp3 | With temperature1,2,3 being the title for each column and $temp1,2,3 being the values read. I tried this but I can't go far. _FileWriteLog($logFile,$Temp1) Your help is needed (a bit urgent !!! sorry.) Thank you. Link to comment Share on other sites More sharing options...
omikron48 Posted October 9, 2009 Share Posted October 9, 2009 (edited) $file = FileOpen($logFile, 2) ;use 1 to append FileWriteLine($file, "Temperature1| Temperature2|Temperature3|") FileWriteLine($file, $temp1 & "|" & $temp2 & "|" & $temp2 & "|") ;use FileWrite or FileWriteLine to write any other entries here FileClose($file) Edited October 9, 2009 by omikron48 Link to comment Share on other sites More sharing options...
AvN Posted October 9, 2009 Author Share Posted October 9, 2009 Thank you, this helps. AvN Link to comment Share on other sites More sharing options...
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