Jump to content

OnAutoItExitRegister()


Recommended Posts

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 by Tyranlol
[u]Only by Attempting the Impossible You Can Earn the Remarkable[/u]
Link to comment
Share on other sites

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 work

And 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

If you shut down your computer by windows it first closes all of your running programs, so this should actually work

And 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...