Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Looking for Tutorial GUI


    maxime

    Recommended Posts

    Posted

    Hi i am looking for a tutorial how to make a GUI interact with my script thanks you :)

    Posted

    Literally all you do is make a component in whatever gui library you want to use (probably Swing, use the link eclipseop posted)

     

    Add a listener to that component, (like a click listener), so something happens when the component is clicked.

     

    That something would be maybe setting some value to true or false.

     

    For simplicity sakes maybe a public static variable in your main class that you can set to true or false depending on the click.

    Posted

    Literally all you do is make a component in whatever gui library you want to use (probably Swing, use the link eclipseop posted)

     

    Add a listener to that component, (like a click listener), so something happens when the component is clicked.

     

    That something would be maybe setting some value to true or false.

     

    For simplicity sakes maybe a public static variable in your main class that you can set to true or false depending on the click.

    Making it a static variable will cause issues with multiple instances of the script. No reason to do that afaik.

    Posted

    Making it a static variable will cause issues with multiple instances of the script. No reason to do that afaik.

    Yeah i agree, I only said that just incase he's unfamiliar with whole instances work, because then it could become a pain

    Posted

    Making it a static variable will cause issues with multiple instances of the script. No reason to do that afaik.

    Wtf? No it won't lmao...

    Posted

    Wtf? No it won't lmao...

    I think he's saying if you have multiple tabs open of the same script, it could potentially mess it up due to it all using the same JVM. I'm not sure of the specifics though

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.