Jump to content

Recommended Posts

Posted

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

Posted

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?

Posted

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!

Posted

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

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
×
×
  • Create New...