hero3128 Posted May 12, 2017 Share Posted May 12, 2017 Hey guys, i have a quick question i havent been able to find a workaround for. When coding and testing local based scripts, each time you compile and test the script, you cannot edit and recompile the script because the IDE thinks the script is still open/active by osbot. Is there any workaround for this other than restarting the client each and every time you wana test out a change? Thank you! Quote Link to comment Share on other sites More sharing options...
Zappster Posted May 12, 2017 Share Posted May 12, 2017 I've never once had this issue. What IDE are you using? Are you connecting your IDE to OSBot via the -debug cli? Quote Link to comment Share on other sites More sharing options...
d0zza Posted May 12, 2017 Share Posted May 12, 2017 I personally just add a 1 to the script name in both the IDE and the jar file it builds and drag it into the directory. However there might be a better way, I'm not sure Quote Link to comment Share on other sites More sharing options...
hero3128 Posted May 12, 2017 Author Share Posted May 12, 2017 1 minute ago, Zappster said: I've never once had this issue. What IDE are you using? Are you connecting your IDE to OSBot via the -debug cli? Im using IntelliJ, its the same problem if i want to try to delete the .jar out of the /OSBot/Scripts folder so i dont think its the IDE. And no im not connecting the IDE to OSBot Quote Link to comment Share on other sites More sharing options...
Zappster Posted May 12, 2017 Share Posted May 12, 2017 5 minutes ago, hero3128 said: Im using IntelliJ, its the same problem if i want to try to delete the .jar out of the /OSBot/Scripts folder so i dont think its the IDE. And no im not connecting the IDE to OSBot I've just tried to replicate but I can't. Weird Try starting osbot with -debug cli and connect with your ide, you'll be able to stop the script from running from there. Quote Link to comment Share on other sites More sharing options...
Aiban Posted May 12, 2017 Share Posted May 12, 2017 Just export the script into the same jar and it should work, to delete the jar you have to close OSBot Quote Link to comment Share on other sites More sharing options...
hero3128 Posted May 12, 2017 Author Share Posted May 12, 2017 4 minutes ago, Aiban said: Just export the script into the same jar and it should work, to delete the jar you have to close OSBot If i export the script as the same jar Intellij gives me an error as if the file is still open in another program Quote Link to comment Share on other sites More sharing options...
Phaibooty Posted May 12, 2017 Share Posted May 12, 2017 36 minutes ago, hero3128 said: If i export the script as the same jar Intellij gives me an error as if the file is still open in another program 42 minutes ago, Aiban said: Just export the script into the same jar and it should work, to delete the jar you have to close OSBot I'm sorry to stray off topic a bit, but when you're exporting to a jar file, is your script running/showing in osbot? im also using IntelliJ, but when I drag the jar file to the scripts folder, the script doesn't show up. When I use the .class, it works perfectly fine. LOL On topic: have you closed osbot before Rebuilding the artifacts? Quote Link to comment Share on other sites More sharing options...
hero3128 Posted May 12, 2017 Author Share Posted May 12, 2017 41 minutes ago, Phaibooty said: I'm sorry to stray off topic a bit, but when you're exporting to a jar file, is your script running/showing in osbot? im also using IntelliJ, but when I drag the jar file to the scripts folder, the script doesn't show up. When I use the .class, it works perfectly fine. LOL On topic: have you closed osbot before Rebuilding the artifacts? Script is not running anymore and to rebuild to artifact, i have to close osbot or else it wont work Quote Link to comment Share on other sites More sharing options...
Explv Posted May 12, 2017 Share Posted May 12, 2017 (edited) 2 hours ago, hero3128 said: Im using IntelliJ, its the same problem if i want to try to delete the .jar out of the /OSBot/Scripts folder so i dont think its the IDE. And no im not connecting the IDE to OSBot If you are rebuilding the same artifact it will work fine. Intellij states that there is an error, something along the lines of unable to delete .jar, but it still works. Just make sure you press refresh in the script selector on OSBot. 1 hour ago, Phaibooty said: I'm sorry to stray off topic a bit, but when you're exporting to a jar file, is your script running/showing in osbot? im also using IntelliJ, but when I drag the jar file to the scripts folder, the script doesn't show up. When I use the .class, it works perfectly fine. LOL Why are you dragging the .jar file to the scripts folder? In the artifact settings just set the path to the scripts folder. 40 minutes ago, hero3128 said: Script is not running anymore and to rebuild to artifact, i have to close osbot or else it wont work In what way do you think that it is not working? Have you tried doing something simple like, changing the script name in the script manifest attribute, rebuilding the artifact, then refreshing the script list in OSBot and seeing if the script name changes? Edited May 12, 2017 by Explv Quote Link to comment Share on other sites More sharing options...
Phaibooty Posted May 12, 2017 Share Posted May 12, 2017 @Explv sorry, I didn't mean to say drag. When I build artifacts the jar file is in my scripts folder. But doesn't show up in osbot. read on one of your other posts that I might have to bring some sort of folder over in the artifacts menu. Will try when I'm home. Quote Link to comment Share on other sites More sharing options...
Explv Posted May 12, 2017 Share Posted May 12, 2017 (edited) 5 minutes ago, Phaibooty said: @Explv sorry, I didn't mean to say drag. When I build artifacts the jar file is in my scripts folder. But doesn't show up in osbot. read on one of your other posts that I might have to bring some sort of folder over in the artifacts menu. Will try when I'm home. Have you verified that the .jar is not empty? You have to make sure you add the "compiled output" to your .jar in the artifact settings (by moving it to the left hand side) like in this image (sorry not OSBot specific because I'm on my phone) Edited May 12, 2017 by Explv 1 Quote Link to comment Share on other sites More sharing options...
hero3128 Posted May 12, 2017 Author Share Posted May 12, 2017 1 hour ago, Explv said: If you are rebuilding the same artifact it will work fine. Intellij states that there is an error, something along the lines of unable to delete .jar, but it still works. Just make sure you press refresh in the script selector on OSBot. Why are you dragging the .jar file to the scripts folder? In the artifact settings just set the path to the scripts folder. In what way do you think that it is not working? Have you tried doing something simple like, changing the script name in the script manifest attribute, rebuilding the artifact, then refreshing the script list in OSBot and seeing if the script name changes? I haven't tested to see if the script actually DOES get updated even if IntelliJ states it cannot delete the artifact. I will test and get back to you! Quote Link to comment Share on other sites More sharing options...
Phaibooty Posted May 12, 2017 Share Posted May 12, 2017 3 hours ago, Explv said: Have you verified that the .jar is not empty? You have to make sure you add the "compiled output" to your .jar in the artifact settings (by moving it to the left hand side) like in this image (sorry not OSBot specific because I'm on my phone) That did the trick. Thank you! Quote Link to comment Share on other sites More sharing options...
hero3128 Posted May 13, 2017 Author Share Posted May 13, 2017 Update: Re-building the artifact does give the error that the .jar is open elsewhere, but it does infact work. Thank you all. Quote Link to comment Share on other sites More sharing options...