Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question How to update the EmbeddableUi from a task bot?

Joined
May 15, 2018
Messages
5
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?
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,768
You can use binding of properties to your components. But I don't quite understand what exactly you want to update in your UI.
 
Joined
May 15, 2018
Messages
5
You can use binding of properties to your components. But I don't quite understand what exactly you want to update in your UI.

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.
 
Last edited:
Joined
May 15, 2018
Messages
5
What progress are we talking about?

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.
 
@Derk Any ideas?
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,768
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.
 
@Derk Any ideas?
Join the runemate slack.
 
Top