alright; here's my modification of yangc10 coding. Secondly, yangc10 forgot to mention that you will need to change the admin user/pass shown bold below OpenServer. With this; you do not need to open the Certification.bat manually anymore.
Open Server
Code:
OpenServer()
Func OpenServer()
ShellExecute("bin\CustomCertificationServer.exe", "bin\packt.dat")
sleep(2000)
ShellExecute("GlobalManager.exe", @WorkingDir)
sleep(2000)
ShellExecute("MachineManager.exe", @WorkingDir)
sleep(2000)
ShellExecute("GatewayServer.exe", @WorkingDir)
sleep(2000)
ShellExecute("DownloadServer.exe", @WorkingDir)
sleep(2000)
ShellExecute("FarmManager.exe", @WorkingDir)
sleep(2000)
ShellExecute("SR_ShardManager.exe", @WorkingDir)
sleep(2000)
ShellExecute("AgentServer_no_xtrap.exe", @WorkingDir)
sleep(2000)
ShellExecute("SR_GameServer.exe", @WorkingDir)
sleep(15000)
_Opensmc()
EndFunc
Func _Opensmc()
ShellExecute("smc_independent.exe", @WorkingDir) ;open and run smc
WinActivate("[CLASS:#32770]","")
sleep(1000)
send("YOURUSER")
sleep(1000)
send("{TAB}")
sleep(1000)
send("YOURPASS")
send("{ENTER}")
sleep(1000)
SMC()
EndFunc
Func SMC()
WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
WinSetState("[CLASS:SMC]", "", @SW_MAXIMIZE)
mouseclick("LEFT", 39, 32, 1)
sleep(500)
MouseClick("LEFT", 37, 52, 1)
sleep(15000)
Mouseclick("LEFT", 343, 51, 1)
sleep(3000)
Mouseclick("LEFT", 184, 85, 1)
sleep(500)
MouseClick("LEFT", 374, 85, 1)
sleep(500)
MouseClick("LEFT", 807, 85, 1)
sleep(300000)
MouseClick("RIGHT", 31, 161, 1) ;start Global and up
sleep(1000)
MouseClick("LEFT", 89, 250, 1)
sleep(500)
send("{ENTER}")
sleep(3000)
Mouseclick("RIGHT", 222, 161, 1) ; start Agent and up
sleep(1000)
MouseClick("LEFT", 277, 251, 1)
sleep(500)
Send("{Enter}")
ShellExecute("GSDown.exe", @WorkingDir)
ShellExecute("Delme.exe", @WorkingDir)
Exit
EndFunc
GSDown
Code:
HotKeySet("{ESC}", "_Quit")
Main()
Func Main()
While 1
WinWait("[CLASS:SR_GameServer]")
WinWaitClose("[CLASS:SR_GameServer]")
Run("SR_GameServer.exe", @WorkingDir)
Sleep(145000)
CloseHim()
WEnd
EndFunc
Func _Quit()
Exit
EndFunc
Func CloseHim()
If WinExists("[CLASS:#32770]","") Then
WinActivate("[CLASS:#32770]","")
sleep(1000)
ControlClick("[TITLE:Alarm]", "", "[CLASS:Button; INSTANCE:2]")
SMC()
Else
SMC()
EndIf
EndFunc
Func SMC()
WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
WinSetState("[CLASS:SMC]","", @SW_MAXIMIZE)
sleep(5000)
Mouseclick("RIGHT", 519, 216, 1) ; start Agent and up
sleep(1000)
MouseClick("LEFT", 563,309, 1)
sleep(500)
Send("{Enter}")
Main()
EndFunc
Got it from autoit site, but did a little modification:
Delete dumps file every 1second it finds.
Delme.exe
Code:
HotKeySet("{ESC}", "_Quit")
$filetype = "*.log"
AdlibRegister("Deleteit", 1000)
While sleep(1000)
WEnd
Func Deleteit()
if FileExists($filetype) Then
FileDelete($filetype)
EndIf
EndFunc
Func _Quit()
Exit
EndFunc