Sign in to follow this  
Followers 0
Morigan

Closed by other program

7 posts in this topic

My script is running perfectly, but as soon as I start a certain program, it closes (after 15 sec).

So I'm searching for a way to protect the script from other programs.

I just tested an other script, same problem.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

I know which process is closing my program but I need that process, so simply closing it is no option.

And yes it is compiled and all other scripts are closed aswell.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

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