imacrazyballoono 0 Posted June 19, 2006 How can I make the script write to a file just before it logs of or shutdowns? Share this post Link to post Share on other sites
imacrazyballoono 0 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 Share this post Link to post Share on other sites
AutoItKing 0 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] Share this post Link to post Share on other sites