BigCahunaBurger Posted December 22, 2021 Share Posted December 22, 2021 (edited) Is there a way to launch a new script when an old one terminates? I'm thinking on the onexit() function. But, any way to do this with the osbot Cli is fine too. I've checked the API but can't find it Edited December 22, 2021 by BigCahunaBurger Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted December 22, 2021 Share Posted December 22, 2021 1 hour ago, BigCahunaBurger said: Is there a way to launch a new script when an old one terminates? I'm thinking on the onexit() function. But, any way to do this with the osbot Cli is fine too. I've checked the API but can't find it Not possible in current versions of osbot 1 Quote Link to comment Share on other sites More sharing options...
Kramnik Posted December 22, 2021 Share Posted December 22, 2021 You can do that on CLI, but its kinda dumb in my opinion. When script finishes make it close the client then in CLI if you have another code cued up it will start another client with new script 2 Quote Link to comment Share on other sites More sharing options...
BigCahunaBurger Posted December 22, 2021 Author Share Posted December 22, 2021 (edited) 9 hours ago, Kramnik said: You can do that on CLI, but its kinda dumb in my opinion. When script finishes make it close the client then in CLI if you have another code cued up it will start another client with new script Nice, so just use the -script flag two times? Or two sets of parameters for one -script flag? Edited December 22, 2021 by BigCahunaBurger Quote Link to comment Share on other sites More sharing options...
BigCahunaBurger Posted December 23, 2021 Author Share Posted December 23, 2021 I tried with -bot -script twoScript:"username;pass" -script oneScript:"username;pass" as well as "-bot -script oneScript:"username;pass" twoScript:"username;pass" but no luck. I may be formatting it incorrectly. Perhaps you can share your command line format Kramnik, for the record I'm exiting the script on onExit with System.exit(), which is probably not correct. Quote Link to comment Share on other sites More sharing options...
Kramnik Posted December 23, 2021 Share Posted December 23, 2021 4 hours ago, BigCahunaBurger said: I tried with -bot -script twoScript:"username;pass" -script oneScript:"username;pass" as well as "-bot -script oneScript:"username;pass" twoScript:"username;pass" but no luck. I may be formatting it incorrectly. Perhaps you can share your command line format Kramnik, for the record I'm exiting the script on onExit with System.exit(), which is probably not correct. I assume you got one CLI commands running fine, so just create a .bat file like this: -*CLI for first script* -*CLI for second script* The first script needs to have System.exit() then after the client closes the bat file will run second line with the new script 1 Quote Link to comment Share on other sites More sharing options...
ExtraBotz Posted December 23, 2021 Share Posted December 23, 2021 You can create a third party launcher that handles the creation of the client. Using CLI parameters you can then start and stop scripts in order. 1 Quote Link to comment Share on other sites More sharing options...
BigCahunaBurger Posted December 23, 2021 Author Share Posted December 23, 2021 (edited) 24 minutes ago, Kramnik said: I assume you got one CLI commands running fine, so just create a .bat file like this: -*CLI for first script* -*CLI for second script* The first script needs to have System.exit() then after the client closes the bat file will run second line with the new script Ohh okay. Yeah let me see if that works. It should... Edited December 23, 2021 by BigCahunaBurger Quote Link to comment Share on other sites More sharing options...
BigCahunaBurger Posted December 30, 2021 Author Share Posted December 30, 2021 Just wanted to note that for me, getting the script to wait for the first VM to close requires using the debug parameter Quote Link to comment Share on other sites More sharing options...