Jump to content

Closed by other program


Recommended Posts

First thought is to have another script run continuously to make sure that the one script you need to stay active is running or not. If it is not running, start it. A simple While loop with a Sleep function would do it.

While 1
    If Not ProcessExists("YourProcess.exe") Then Run("YourProcess.exe")
    Sleep(1000) ;SLeep 1 second
WEnd
If that script stops running however, you will be in the same boat as you currently are in. You can also look at installing your script as a service. Google ServiceEx. That would work.

Edited by Varian
Link to comment
Share on other sites

Thank you, I tried both. The second script survives way longer than the other, but not more than 2 min.

When I run it with ServiceEx, I get a weird message.

*translating* "A program wants to display a message"

-> Display message

-> Ask later

This may occur if the program is not completely compatible with windows

When I display the "message" my script runs as it should, but in Win98 style (I'm using Win7) and my desktop is light blue. No icons, no taskbar, no nothing.

I will search for a solution, since I realy think it would work like this.

Link to comment
Share on other sites

Have you identified what program/process is closing your program?

Is your program a compiled AutoIT script? If so, do you have any scripts that can run without being forced closed?

Edited by Varian
Link to comment
Share on other sites

Sounds link an AntiVirus/AntiMalware program that is closing your AutoIT programs. I cannot think of any other process that would target all of your compiled scripts. I can't do anything to help you circumvent that.

Have yo tried running the scripts from other locations? (For example, rather than running it the Windows Directory, try running it from the root of the C:\ drive)

Edited by Varian
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...