Tyranlol Posted August 28, 2010 Share Posted August 28, 2010 (edited) Hello! I'm using OnAutoITExitRegister() to start a smtp mailing program when another autoit program exits, it works perfectly if i exit the program normally but if i close my computer it doesn't start the mailing program any ideas or suggestions? thanks in advance An Example: OnAutoItExitRegister("ExitScript") $log=@desktopdir & "\" Sleep(10000) Func ExitScript() run($log & "mail.exe") Endfunc Edited August 28, 2010 by Tyranlol [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] Link to comment Share on other sites More sharing options...
JohnOne Posted August 28, 2010 Share Posted August 28, 2010 Perhaps its because your computer is shutting down. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Tyranlol Posted August 28, 2010 Author Share Posted August 28, 2010 Perhaps its because your computer is shutting down.Woooooooooooow, tell me bout it On to the fact, if you shut down your computer by windows it first closes all of your running programs, so this should actually workAnd it does work if you use a msgbox or something... [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] Link to comment Share on other sites More sharing options...
JohnOne Posted August 28, 2010 Share Posted August 28, 2010 Can you manually run your process as the computer is shutting down? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Tvern Posted August 28, 2010 Share Posted August 28, 2010 If you shut down your computer by windows it first closes all of your running programs, so this should actually workAnd it does work if you use a msgbox or something...It's like this I think:If you shut down your computer, windows sends all active applications a request to shut down and blocks new programs from being started. If a program fails to respons windows forces it to exit. A messagebox does not need to start a new applications, so it's allowed. What you probably want to do is cancel the shutdown, do what you want and then start the shutdown again. (if that's possible) Link to comment Share on other sites More sharing options...
Tyranlol Posted August 28, 2010 Author Share Posted August 28, 2010 It's like this I think:If you shut down your computer, windows sends all active applications a request to shut down and blocks new programs from being started. If a program fails to respons windows forces it to exit. A messagebox does not need to start a new applications, so it's allowed. What you probably want to do is cancel the shutdown, do what you want and then start the shutdown again. (if that's possible)Thanks for the reply Tvern.You gave me a few ideas, i could #include my other script, or do a few other things. thanks again [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] 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