Request Some help with auto it!

01/29/2013 11:27 Darkness™#1
Hi guys , i don't know if i'm allowed to make this kind of post and ask for help, but i need help!

I want to make an tool to Kill "sro_client" when it is runing.

Check if Process is runing and then kill it, and start a kind of timer to check it again in lets say 30 minutes.

i was trying by myself and didn't sucess, i just was able to close the runing process, but didn't figured out how to make it check every X time.


If ProcessExists("sro_client.exe") Then
ProcessClose("sro_client.exe")
EndIf

This just basically will close the process if it is runing.

Please help me !

(I want this tool because i'm using mbot with 5 chars, and when they dced they connect all togetter and use all my ram ! )

Thanks in advanced.
01/29/2013 15:22 jremy#2
Maybe something like:
Code:
Global $checkSro = True, $timer

While Sleep(10)
	If ProcessExists("sro_client.exe") AND $checkSro = True Then
		ProcessClose("sro_client.exe")
		$timer = TimerInit()
		$checkSro = False
	EndIf

	If TimerDiff($timer) > 60000 * 30 AND $checkSro = False Then
		$checkSro = True
	EndIf
Wend
But for me it doesn't seem like to be a solution to your problem. Mbot have "Wait ? minutes before relogin" option. Use different interval for each character.
01/29/2013 18:02 Darkness™#3
No, i'm not using a interval for each character, do you think this will be necesary when using this script ?

Or, what do you think could be a solution ?
01/30/2013 08:42 yurka333#4
U want to close sro_client right when mbot relogin, right?

Quote:
While 1
If WinExists("XXXX [SRO_Client]") Then
ProcessClose(WinGetProcess("XXXX [SRO_Client]"))
EndIf
Sleep(5000)
WEnd
Just copy-paste 2,3,4 line for all character u need.
XXXX - Is your char name
Its will check every 5 seconds, plus, u can choose what window u want to close. And yes, use a bit different interval between char relogin for better produce.

And this script will close window right after relogin, and not during it :)
01/30/2013 10:42 Darkness™#5
Thanks for those scripts, but what should I add for something like that.

When XXXX [SRO_Client] process is running , then wait like 45 seconds, because sometimes when all accounts are connected together, they are all in town, and the client freezes for some seconds, and if the script kill it the bot will not start i guess.

Because it will be like i killed the client when it was in the Char selection , do you understand me ?

Thanks again!
01/30/2013 13:15 yurka333#6
Here you are, it will wait 45sec after detected client with name XXXX [SRO_Client]

Quote:
While 1
If WinExists("XXXX [SRO_Client]") Then
Sleep(45000)
ProcessClose(WinGetProcess("XXXX [SRO_Client]"))
EndIf
Sleep(5000)
WEnd