imacrazyballoono Posted June 19, 2006 Share Posted June 19, 2006 How can I make the script write to a file just before it logs of or shutdowns? Link to comment Share on other sites More sharing options...
imacrazyballoono Posted June 19, 2006 Author Share Posted June 19, 2006 (edited) For anyone who cares, I ended up just having it continuously writing it to a file. do $file = fileopen("C:\Documents and Settings\other\My Documents\Stuff\timer.txt", 0) $time = filereadline($file) fileclose($file) MsgBox(4096, "Test", $time) $time = $time - 1 $file2 = fileopen("C:\Documents and Settings\other\My Documents\Stuff\timer.txt", 2) FileWriteLine($file, $time) fileclose($file) until $time < 0 Edited June 19, 2006 by imacrazyballoono Link to comment Share on other sites More sharing options...
AutoItKing Posted June 20, 2006 Share Posted June 20, 2006 (edited) Put this in your script, it'll do whatever is there when the script exits Func OnAutoItExit ( ) ;Your code here EndFunc AutoIt Help File: Defines a user-defined function that will be called when the script exits. Edited June 20, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] 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