BlueLord Posted July 17, 2010 Share Posted July 17, 2010 Hello AutoIt programers! I'm new in this programing language and i don't have good programing skills. I have search/study the forum and i have made i script. I need some help and sugestion for my script. Whow script work: it's write in a log file the log-in time (when windows start) and log-off time (when windows shutdown) I have create a funtion to backup log file from last month every new month (until 4th of month). The function work separated but in when i put togheter don't work properly. When backup function it's call the file it's backup after the current log-in time is write (the log-in time of day when back-up it's made apear in back-up file no in new file). And another issue i don't know how to implemant this function Log-off : http://www.autoitscript.com/forum/index....wtopic=19370&st=40&p=186785&#entry186785 I hope somebody can help me Thank's In attachament i put my scriptscript.au3 Link to comment Share on other sites More sharing options...
Mat Posted July 17, 2010 Share Posted July 17, 2010 (edited) Global Const $ENDSESSION_CLOSEAPP = 0x00000001 Global Const $ENDSESSION_CRITICAL = 0x40000000 Global Const $ENDSESSION_LOGOFF = 0x80000000 Global Const $WM_QUERYENDSESSION = 0x0011 GUICreate("You need a GUI to register messages...") GUISetState() GUIRegisterMsg($WM_QUERYENDSESSION, "InterceptShutdown") While GUIGetMsg() <> -3 Sleep(10) WEnd Func InterceptShutdown($hWnd, $msg, $w, $l) If $l = $ENDSESSION_LOGOFF Then MsgBox(0, "", "Logging Off") Else MsgBox(0, "", "Shutting down") EndIf EndFunc ;==>InterceptShutdown Edited July 17, 2010 by Mat AutoIt Project Listing 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