Morigan Posted August 31, 2010 Share Posted August 31, 2010 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. Link to comment Share on other sites More sharing options...
Varian Posted August 31, 2010 Share Posted August 31, 2010 (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 WEndIf 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 August 31, 2010 by Varian Link to comment Share on other sites More sharing options...
Morigan Posted August 31, 2010 Author Share Posted August 31, 2010 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 More sharing options...
Varian Posted August 31, 2010 Share Posted August 31, 2010 (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 August 31, 2010 by Varian Link to comment Share on other sites More sharing options...
Morigan Posted August 31, 2010 Author Share Posted August 31, 2010 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. Link to comment Share on other sites More sharing options...
Varian Posted August 31, 2010 Share Posted August 31, 2010 (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 August 31, 2010 by Varian Link to comment Share on other sites More sharing options...
JohnOne Posted August 31, 2010 Share Posted August 31, 2010 Just spit it out, what is closing your scripts? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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