Sign in to follow this  
Followers 0
autoitxp

Exit and Run

3 posts in this topic

Hi

How to run application again on exit function when application exit it should start again path is my desktop ? is it possible ?

well this code is not exit previous application ?

Func OnAutoItExit()

RunWait("123.exe", @DesktopCommonDir, @SW_MAXIMIZE)

EndFunc   ;==>OnAutoItExit

Share this post


Link to post
Share on other sites



Hi

How to run application again on exit function when application exit it should start again path is my desktop ? is it possible ?

well this code is not exit previous application ?

Func OnAutoItExit()

RunWait("123.exe", @DesktopCommonDir, @SW_MAXIMIZE)

EndFunc   ;==>OnAutoItExit

Func OnAutoItExit()
Run("123.exe", @DesktopCommonDir, @SW_MAXIMIZE)
EndFunc   ;==>OnAutoItExit

Share this post


Link to post
Share on other sites

Hi

How to run application again on exit function when application exit it should start again path is my desktop ? is it possible ?

well this code is not exit previous application ?

Func OnAutoItExit()

RunWait("123.exe", @DesktopCommonDir, @SW_MAXIMIZE)

EndFunc   ;==>OnAutoItExit

The following code works just fine for me:

Opt("OnExitFunc","OnAutoItExit")

MsgBox(0, "", "testing")


Func OnAutoItExit()

Run("123.exe", @DesktopCommonDir, @SW_MAXIMIZE)

EndFunc   ;==>OnAutoItExit

I wouldn't use RunWait though if I were you, it creates an infinate loop thats a pain to get out of.


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
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
Sign in to follow this  
Followers 0