ITSky8 Posted February 21, 2008 Posted February 21, 2008 Hello! I would like to write a code to check my application's running, if it occurred error, then close it and run it again. For that purpose, it can use the AdlibEnable, right? But how to use the AdlibEnable? If any one can offer the samples? Thanks! AdlibEnable("myadlib") ;... Exit Func myadlib() If WinActive("Error") Then ;... EndIf EndFunc
weaponx Posted February 21, 2008 Posted February 21, 2008 When you say "I would like to write a code to check my application's running" do you mean the script itself or some external application?
ITSky8 Posted February 21, 2008 Author Posted February 21, 2008 When you say "I would like to write a code to check my application's running" do you mean the script itself or some external application?I would like to check the external Application, but not the script itself. Thanks!
weaponx Posted February 21, 2008 Posted February 21, 2008 You have a good start. AdlibEnable("myadlib") ;Loop forever While 1 WEnd Func myadlib() If WinExists("Error") Then WinClose("Error") ProcessClose("yourprocess.exe") Run("yourprocess.exe") EndIf EndFunc
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