1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question How to update the EmbeddableUi from a task bot?

Discussion in 'Developer Support' started by elegant, May 28, 2018.

  1. elegant

    Joined:
    May 15, 2018
    Messages:
    5
    Likes Received:
    0
    I've tried updating the EmbeddableUi data and paint via a task, but it only updates it after an inventory (doesn't really work with delays and all, or while running on the same thread).

    How can I have it so that the EmbeddableUi is updated constantly?
     
  2. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    You can use binding of properties to your components. But I don't quite understand what exactly you want to update in your UI.
     
  3. elegant

    Joined:
    May 15, 2018
    Messages:
    5
    Likes Received:
    0
    I want the user to see the bot's progress, similar to a paint.

    Edit: would you happen to have an example? I'm just getting back into Java.
     
    #3 elegant, May 29, 2018
    Last edited: May 29, 2018
  4. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    What progress are we talking about?
     
  5. elegant

    Joined:
    May 15, 2018
    Messages:
    5
    Likes Received:
    0
    Basically I've got this task bot that does a few simple tasks. I'm keeping track of running time, xp gained, items done, money etc. These are stats I want the user to be able to see updated live as the bot runs.

    But keeping track of the data isn't the issue, updating the JavaFX UI is.

    Right now I'm updating it in between each bot task (FetchFromBank, BurnLogs, etc.), but that means the data the user sees is not current (updating every second or on another thread), because the main thread has to wait for the banking to complete in order to update the UI.

    So I'm trying to keep the UI with stat tracking current inside of the task bot.
    --- Double Post Merged, Jun 8, 2018, Original Post Date: May 29, 2018 ---
    @Derk Any ideas?
     
  6. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    Join the runemate slack.
     
  7. elegant

    Joined:
    May 15, 2018
    Messages:
    5
    Likes Received:
    0

Share This Page

Loading...