Jump to content

Testing local scripts issues


hero3128

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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)

default-artifact.png

Edited by Explv
  • Like 1
Link to comment
Share on other sites

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!

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...