techshots Posted May 3, 2006 Share Posted May 3, 2006 Hi guys, I wrote this but after it completes, the autoit3.exe process in task manager remains; you can also see the autioit icon on the bottom right of the system tray. The plain old "EXIT" didn't work so I added a ProcessClose and that still doesn't work. ------------------------------------- CODE BEGIN ------------------------------------------------------- #include <Process.au3> #include <Date.au3> $CurDate = (_Now() ) $DateOnly_from_CurDate = StringLeft($CurDate, 8) $file = FileOpen("F:\hien\XcopyFav.bat", 1) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, "rename favorites" & " " & $DateOnly_from_CurDate & @CRLF) FileWrite($file, "pause") FileClose($file) sleep(5000) _RunDos("F:\hien\XcopyFav.bat") If ProcessExists("AutoIt3.exe") Then ProcessClose("AutoIt3.exe") Endif Exit ------------------------------------- CODE BEGIN ------------------------------------------------------- Link to comment Share on other sites More sharing options...
BigDod Posted May 3, 2006 Share Posted May 3, 2006 I suspect the pause in the batch file is preventing the script reaching the exit command. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
techshots Posted May 3, 2006 Author Share Posted May 3, 2006 Bingo! that's it...thanks so much!I suspect the pause in the batch file is preventing the script reaching the exit command. Link to comment Share on other sites More sharing options...
BigDod Posted May 3, 2006 Share Posted May 3, 2006 Bingo! that's it...thanks so much!Your welcome. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother 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