Jump to content
Sign in to follow this  
lukeneo

@ScriptDir \log

Recommended Posts

lukeneo

$Logs = FileOpen(@ScriptDir &"\log" & @YEAR & @MON & @MDAY & '-' & @HOUR & @MIN & @SEC & '.LOG', 1)

The above code is executing ... But not saved in the /log / folder under @scriptDir .

rather saved in @scriptdir .

what is wrong ?

Share this post


Link to post
Share on other sites
McGod

$Logs = FileOpen(@ScriptDir &"\log\" & @YEAR & @MON & @MDAY & '-' & @HOUR & @MIN & @SEC & '.LOG', 1)

Forgot an extra slash after log

Share this post


Link to post
Share on other sites
SmOke_N

FileOpen doesn't save anything, But it can create the log if you use something like FileOpen(blah, 2). (Or a combination of others with the 2 in it).

If you are wanting to save the data that was there previous (doubtful since your using @Hour and @Sec) then FileRead() it before you erase the content.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
lukeneo

FileOpen doesn't save anything, But it can create the log if you use something like FileOpen(blah, 2). (Or a combination of others with the 2 in it).

If you are wanting to save the data that was there previous (doubtful since your using @Hour and @Sec) then FileRead() it before you erase the content.

Chip ! Thanks ....

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.