Zummy Posted August 6, 2018 Share Posted August 6, 2018 Hello, I'm trying to find a way to kill a specific osbot client. This is what i'm after: say I have 10 osbots clients open but I want to kill the client that has account X running, how could I achieve this? I tried: Finding a way to rename the java.exe process with a java argument in a .bat file. Finding a way to rename the window tile of the client, doesn't look like it's possible alway OSBot 2.5.8 Using a custom login handler and using System.exit, this only works with local scripts and I need to find a solution that also works with SDN scripts. Killing the process with PKILL in cmd based on it's PID but can't find the connection to link specific clients with it's PID number (which client has PID X running account X). Thanks for reading, any help is appreciated . Quote Link to comment Share on other sites More sharing options...
myOSBaccount Posted August 6, 2018 Share Posted August 6, 2018 is it possible that you're cheating the system somehow? you don't seem very VIP to me, and yet you're saying you have more than 1 client running Quote Link to comment Share on other sites More sharing options...
Zummy Posted August 6, 2018 Author Share Posted August 6, 2018 16 minutes ago, myOSBaccount said: is it possible that you're cheating the system somehow? you don't seem very VIP to me, and yet you're saying you have more than 1 client running I'm not saying that I am running more than 1 client, I'm planning to. I will buy VIP ofcourse but right now I'm in the process of setting things up. Quote Link to comment Share on other sites More sharing options...
ez11 Posted August 6, 2018 Share Posted August 6, 2018 @Zappster Quote Link to comment Share on other sites More sharing options...
Zappster Posted August 6, 2018 Share Posted August 6, 2018 Quote Using a custom login handler and using System.exit, this only works with local scripts and I need to find a solution that also works with SDN scripts. Yeah I'm 100% sure you won't be able to make a solution to do that, to work on the SDN Quote Link to comment Share on other sites More sharing options...
LeBron Posted August 6, 2018 Share Posted August 6, 2018 3 hours ago, Zummy said: Hello, I'm trying to find a way to kill a specific osbot client. This is what i'm after: say I have 10 osbots clients open but I want to kill the client that has account X running, how could I achieve this? I tried: Finding a way to rename the java.exe process with a java argument in a .bat file. Finding a way to rename the window tile of the client, doesn't look like it's possible alway OSBot 2.5.8 Using a custom login handler and using System.exit, this only works with local scripts and I need to find a solution that also works with SDN scripts. Killing the process with PKILL in cmd based on it's PID but can't find the connection to link specific clients with it's PID number (which client has PID X running account X). Thanks for reading, any help is appreciated . Click the X in the top right corner of your client Quote Link to comment Share on other sites More sharing options...
Explv Posted August 7, 2018 Share Posted August 7, 2018 (edited) 6 hours ago, Zummy said: Hello, I'm trying to find a way to kill a specific osbot client. This is what i'm after: say I have 10 osbots clients open but I want to kill the client that has account X running, how could I achieve this? I tried: Finding a way to rename the java.exe process with a java argument in a .bat file. Finding a way to rename the window tile of the client, doesn't look like it's possible alway OSBot 2.5.8 Using a custom login handler and using System.exit, this only works with local scripts and I need to find a solution that also works with SDN scripts. Killing the process with PKILL in cmd based on it's PID but can't find the connection to link specific clients with it's PID number (which client has PID X running account X). Thanks for reading, any help is appreciated . Take a look at how I do it in my OSBot manager using the windows tasklist and taskkill commands. I have written this in Java, but you could do it in a batch script. https://github.com/Explv/osbot_manager/blob/master/osbot_manager/src/bot_parameters/configuration/Configuration.java#L347 Essentially: 1. Collect all the PIDs of running OSBot clients. 2. Start a new OSBot process 3. Collect all the PIDs of running OSBot clients. 4. Check which PID has been added by comparing the two lists By doing this you can store which PID is associated to which OSBot client, so when you want to close that client, you just kill the process. Edited August 7, 2018 by Explv 1 Quote Link to comment Share on other sites More sharing options...
Zummy Posted August 7, 2018 Author Share Posted August 7, 2018 6 hours ago, Explv said: Take a look at how I do it in my OSBot manager using the windows tasklist and taskkill commands. I have written this in Java, but you could do it in a batch script. https://github.com/Explv/osbot_manager/blob/master/osbot_manager/src/bot_parameters/configuration/Configuration.java#L347 Essentially: 1. Collect all the PIDs of running OSBot clients. 2. Start a new OSBot process 3. Collect all the PIDs of running OSBot clients. 4. Check which PID has been added by comparing the two lists By doing this you can store which PID is associated to which OSBot client, so when you want to close that client, you just kill the process. OMG you even added linux support! You saved me so much time, thank you so much! Quote Link to comment Share on other sites More sharing options...
Explv Posted August 7, 2018 Share Posted August 7, 2018 2 hours ago, Zummy said: OMG you even added linux support! You saved me so much time, thank you so much! No problem Quote Link to comment Share on other sites More sharing options...
Butters Posted August 7, 2018 Share Posted August 7, 2018 Lovely solution from Explv. Though it's this exact reason why I waited for Java 9 to come out back in September. If you launch your OSBot processes externally (as with Explvs launcher) you can use Java 9 Process API https://www.javaworld.com/article/3176874/java-language/java-9s-other-new-enhancements-part-3.html Makes it easy to get PID's, kill processes and etc Quote Link to comment Share on other sites More sharing options...
Antonio Kala Posted August 8, 2018 Share Posted August 8, 2018 Another solution is closing them all and restarting via cli the clients that you do want to continue botting with. Quote Link to comment Share on other sites More sharing options...