Jump to content

Testing script changes without restarting client


DrizzyBot

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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