Jump to content

Testing script changes without restarting client


Recommended Posts

Posted

Basically as the title states, I'm one of the people that have to restart the entire client just to test script changes.

I read this thread but nothing that was offered there helped me out:

This is how I setup Eclipse:

Yes, I'm clicking refresh in the bot client. All of the files are compiling in the OSBot script folder just fine and up to date, but the client will simply not run the new script.

 

If anyone has any other suggestions, I'd love to hear them. Thanks in advanced.

Posted (edited)
3 hours ago, El_Maestro said:

Are you using eclipse or intellij?

Eclipse

3 hours ago, nosepicker said:

Check carefully if you really overwritten the jar (last change date in file system).

Yes, it's overwriting correctly.

 

EDIT: Figured it out. It only wasn't reloading scripts correctly if I ran the client directly through Eclipse. Once I launched OSBot by itself, it worked properly.

Edited by DrizzyBot
Posted
On 1/7/2018 at 3:49 PM, DrizzyBot said:

 

EDIT: Figured it out. It only wasn't reloading scripts correctly if I ran the client directly through Eclipse. Once I launched OSBot by itself, it worked properly.

What if I want to run the client through the ide to set breakpoints?

Posted
On 1/7/2018 at 11:25 PM, nosepicker said:

Enlighten us, sounds interesting

Basically you just run a script as normal... but this script you run should actually just be something that loads in an external jar and executes it. Reloading the jar in whenever it changes (so you'd watch for file changes)

https://gist.github.com/anonymous/50ad5efb7e7cf3a3da8a097eadbd276d This is one i wrote for a different client (i apologize if this is not allowed),

but its the same basic idea, you can use that and just change it to make it work with osbot.

As far as I know, when you instantiate the class from the jar file, you can just pass the Script instance to the new class through the constructor.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...