Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Launch a new script on exit

Featured Replies

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 by BigCahunaBurger

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

  • Author
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 by BigCahunaBurger

  • Author

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.

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

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.

  • Author
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 by BigCahunaBurger

  • Author

Just wanted to note that for me, getting the script to wait for the first VM to close requires using the debug parameter

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.