Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > CoD Multiplayer

CoD Multiplayer Everything about multiplayer in IL-2 CoD

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-22-2011, 08:20 AM
gec gec is offline
Registered Member
 
Join Date: Jun 2010
Location: Zagreb, Croatia
Posts: 4
Default Dedicated server automation

Hi all,

i wanted to make some kind of tool to reset my server if something fails.

i'm no programmer but have some basic knowledge about it. for this purpose i've used AutiIt scripting language.

It is not allowed to discus game automation on their forums so i'll share my accomplishments and troubles with u.

the script is waiting in the tray and checks if Launcher program is running. if not it runs it and sends commands to load and start map cycle.

it also checks for error windows, closes them and restarts the server.

it works fine most of the times just did not cache all the errors windows that can aper that needs to be closed.

here is the script:

Code:
AutoItSetOption ("TrayIconDebug", 1);0-off
While 1 = 1
	While WinExists ("Launcher") > 0 ; if window exists ...
		While WinExists("Steam Connection") > 0 ; check if this windows exists and close
			WinActivate("Steam Connection")
			Send("{ENTER}")
			Sleep (500)
		WEnd
		While WinExists("Steam Connection Error") > 0 ; check if this windows exists and close
			WinActivate("Steam Connection Error")
			Send("{ENTER}")
			Sleep (500)
		WEnd
		While WinExists("Error") > 0 ; check if this windows exists and close
			WinActivate("Error")
			Send("{ENTER}")
			Sleep (500)
		WEnd
		While WinExists("Steam - Self Updater") > 0 ; check if this windows exists and close
			WinActivate("Steam - Self Updater")
			Send("{ENTER}")
			Sleep (500)
		WEnd
		While WinExists("Steam - Shutdown") > 0 ; check if this windows exists and close
			WinActivate("Steam - Shutdown")
			Send("{ENTER}")
			Sleep (500)
		WEnd
		Sleep (60000) ; check again in a minute
	WEnd
; if window does not exist
	ShellExecute("Launcher.lnk")
	WinActivate("Launcher")
	Sleep(10000)
	WinActivate("Launcher")
	Send("{ENTER}")
	Send("f start.cmd")
	Send("{ENTER}")
WEnd
i'm not going to explain how AutoIt works. please google it, RTFM , and try to understand it. it is quite simple.

would like to get some good ideas how to make it better. specially from programmers.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.