JawwadRauf Posted August 24, 2011 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
rcmaehl Posted August 24, 2011 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 WhyNotWin11, MSEdgeRedirect Cisco Finesse, Github, IRC UDF, WindowEx UDF
JawwadRauf Posted August 25, 2011 Author Posted August 25, 2011 [quote name='rcmaehl' timestamp='1314189442' post='921266'] Use:FileWriteLine($file, "Date: " & $DATE )instead of:FileWriteLine($file, "Date: ", $DATE )
hannes08 Posted August 25, 2011 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]
JawwadRauf Posted August 27, 2011 Author 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)
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