DrizzyBot Posted January 7, 2018 Share Posted January 7, 2018 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. Quote Link to comment Share on other sites More sharing options...
Chikan Posted January 7, 2018 Share Posted January 7, 2018 Export the jar file to the same path, and just overwrite the old jar. Then hit refresh on the client. That's all I have to do using eclipse anyway. 2 Quote Link to comment Share on other sites More sharing options...
DrizzyBot Posted January 7, 2018 Author Share Posted January 7, 2018 32 minutes ago, Chikan said: Export the jar file to the same path, and just overwrite the old jar. Then hit refresh on the client. That's all I have to do using eclipse anyway. I've tried that. Still runs the old script somehow. Quote Link to comment Share on other sites More sharing options...
Butters Posted January 7, 2018 Share Posted January 7, 2018 38 minutes ago, DrizzyBot said: I've tried that. Still runs the old script somehow. Check carefully if you really overwritten the jar (last change date in file system). Quote Link to comment Share on other sites More sharing options...
DrizzyBot Posted January 7, 2018 Author Share Posted January 7, 2018 (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 January 7, 2018 by DrizzyBot Quote Link to comment Share on other sites More sharing options...
MadDev Posted January 7, 2018 Share Posted January 7, 2018 You can also write your own reloader that will reload the script on jar change, and run it on top of your script. Then you don't even need to go and stop the script and refresh for changes. Quote Link to comment Share on other sites More sharing options...
Butters Posted January 8, 2018 Share Posted January 8, 2018 6 hours ago, MadDev said: You can also write your own reloader that will reload the script on jar change, and run it on top of your script. Then you don't even need to go and stop the script and refresh for changes. Enlighten us, sounds interesting Quote Link to comment Share on other sites More sharing options...
yfoo Posted January 8, 2018 Share Posted January 8, 2018 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? Quote Link to comment Share on other sites More sharing options...
battleguard Posted January 9, 2018 Share Posted January 9, 2018 17 hours ago, PayPalMeRSGP said: What if I want to run the client through the ide to set breakpoints? Quote Link to comment Share on other sites More sharing options...
MadDev Posted January 9, 2018 Share Posted January 9, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted January 9, 2018 Share Posted January 9, 2018 Looks like you got it sorted out. Another thing worth watching out for is making sure you don't have multiple script files in the folder with the same manifest name. Apa 1 Quote Link to comment Share on other sites More sharing options...
Juggles Posted January 9, 2018 Share Posted January 9, 2018 This happened to me when I first started writing scripts Quote Link to comment Share on other sites More sharing options...
Antonio Kala Posted January 9, 2018 Share Posted January 9, 2018 58 minutes ago, Juggles said: This happened to me when I first started writing scripts yep me too Quote Link to comment Share on other sites More sharing options...