Jump to content
Sign in to follow this  
vin

Auto Error Dialog Closer

Recommended Posts

vin

I run a couple of counter strike servers (and some really buggy plugins) that crash about once a day. since i use firedaemon to run them as services, they will automaticlally restart when the program closes. However, when the server program crashes, it opens up a small error box with the error info and a ok button.

since it does not close without me clicking Ok, the server will not auto restart. I was wondering, what would be the best approach to making a script to automatically press ok when an error box comes up.

Share this post


Link to post
Share on other sites
PsaltyDS

I run a couple of counter strike servers (and some really buggy plugins) that crash about once a day.

; ...

I was wondering, what would be the best approach...

Debug the stupid plugins?

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
vin

Debug the stupid plugins?

:P

im no expert with amxx scripting language T_T i thought a simple server restart would be easier as the clients will autoreconnect anyway

Share this post


Link to post
Share on other sites
PsaltyDS

im no expert with amxx scripting language T_T i thought a simple server restart would be easier as the clients will autoreconnect anyway

Well, the answer was only _somewhat_ sarcastic. ;)

It would be better to fix the problem than work around it, but for now, have you checked the pop up with AU3Info.exe? That will tell you what you need to know about the window and any button controls.

Look in AutoIt's help file for AdLibEnable(), WinExist(), and ControlClick(). Play with the examples given there. You want a function that will check for the pop up and click OK (or whatever) when it shows up. Then you use AdLibEnable to run that function every 1000ms or so. You'll also need a While/WEnd do-nothing loop just to keep the script running in the background. Include a Sleep(50) in there to keep the loop from hogging CPU cycles.

Play with it, and if you get stuck post some code and get some help.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.