JawwadRauf Posted August 24, 2011 Share Posted August 24, 2011 $DATE = @MDAY & "/" & @MON & "/" & @YEAR$file = FileOpen("D:\Report.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") ExitEndIfFileWriteLine($file, "Date: ", $DATE )FileWriteLine($file, "" & @CRLF)FileClose($file)_________________________________________________________________FileWriteLine($file, "Date: ", $DATE)^ ERROR>Exit code: 1 Time: 0.207________________________________________________________________please help me i cant put the date function output(spose to be like this "Date: 24/08/2011"in to the txt file every time do that its give me the error help me out Link to comment Share on other sites More sharing options...
rcmaehl Posted August 24, 2011 Share Posted August 24, 2011 Use: FileWriteLine($file, "Date: " & $DATE ) instead of: FileWriteLine($file, "Date: ", $DATE ) My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
JawwadRauf Posted August 25, 2011 Author Share Posted August 25, 2011 [quote name='rcmaehl' timestamp='1314189442' post='921266'] Use:FileWriteLine($file, "Date: " & $DATE )instead of:FileWriteLine($file, "Date: ", $DATE ) Link to comment Share on other sites More sharing options...
hannes08 Posted August 25, 2011 Share Posted August 25, 2011 Just a side-note:you can use the @TAB macro to set spaces. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
JawwadRauf Posted August 27, 2011 Author Share Posted August 27, 2011 Just a side-note: you can use the @TAB macro to set spaces. Done by doing This $file = FileOpen(@WorkingDir & '\' & "Report.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, "Date: " & $DATE) 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