Sign in to follow this  
Followers 0
JawwadRauf

FileWriteLine

5 posts in this topic

$DATE = @MDAY & "/" & @MON & "/" & @YEAR

$file = FileOpen("D:\Report.txt", 1)

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

FileWriteLine($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

Share this post


Link to post
Share on other sites



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


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post


Link to post
Share on other sites

[quote name='rcmaehl' timestamp='1314189442' post='921266']
Use:
FileWriteLine($file, "Date:              " & $DATE )
instead of:
FileWriteLine($file, "Date:              ", $DATE )

Share this post


Link to post
Share on other sites

Just a side-note:

you can use the @TAB macro to set spaces. :mellow:


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

Just a side-note:

you can use the @TAB macro to set spaces. :mellow:

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)

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  
Followers 0