Ok so I've messing around with my server last few weeks and discovered after installing Garrysmod that I got a lot of srcds.exe memory errors, that would stop my batch scripts from restarting the server untill you clicked ok.
An example of the error is shown below.
[img=http://img410.imageshack.us/img410/8454/exampleob3.th.jpg]
So I wrote this little program with AutoIt and thought I would post here as it maybe of some use to someone having the same problems as me.
*NOTE* Unfortunatly for this to work you must disable the server from locking itself (ctrl-alt-del screen)as if this is up then the program will not get rid of the error. If I figure a way around this I shall post the updated script here.
*Source Code*
$var1=1
While $var1=1
WinWait ("srcds.exe - Application Error")
WinActivate("srcds.exe - Application Error")
ControlClick("srcds.exe - Application Error","","Button1")
send("{ENTER}")
WEnd
*End Source Code*
Compile this with auto it and run the .exe produced, and now everytime a Windows Memory error appears the program will close that window, allowing the source server to restart.
To compile with autoit simple place the above code in a txt file, and save it as scrip.au3. Then right click and press Compile.
Hope this is of some use to people
An example of the error is shown below.
[img=http://img410.imageshack.us/img410/8454/exampleob3.th.jpg]
So I wrote this little program with AutoIt and thought I would post here as it maybe of some use to someone having the same problems as me.
*NOTE* Unfortunatly for this to work you must disable the server from locking itself (ctrl-alt-del screen)as if this is up then the program will not get rid of the error. If I figure a way around this I shall post the updated script here.
*Source Code*
$var1=1
While $var1=1
WinWait ("srcds.exe - Application Error")
WinActivate("srcds.exe - Application Error")
ControlClick("srcds.exe - Application Error","","Button1")
send("{ENTER}")
WEnd
*End Source Code*
Compile this with auto it and run the .exe produced, and now everytime a Windows Memory error appears the program will close that window, allowing the source server to restart.
To compile with autoit simple place the above code in a txt file, and save it as scrip.au3. Then right click and press Compile.
Hope this is of some use to people