Jump to content
UBot Underground

UI html preloads fields when ubot starts


Recommended Posts

I just saw the update today when I opened Ubot that the "UI HTML panel fields will be preloaded when UBOT starts".

 

Can someone please explain to me how this works and if I have any control over what's preloaded into these fields?

Link to post
Share on other sites

It means when you have a ui html panel that has a text box or select box pre filled with a value, we load that into a variable immediately, instead of only loading it into a variable if something changes in the ui html panel.

Link to post
Share on other sites

It means when you have a ui html panel that has a text box or select box pre filled with a value, we load that into a variable immediately, instead of only loading it into a variable if something changes in the ui html panel.

 

Hi Eddie, I tried to do this but it's still not loading it into a variable for me. Can you please provide a working example of this? I am trying to preload vaules using the "$read file" function.

Link to post
Share on other sites

Hi Eddie, I tried to do this but it's still not loading it into a variable for me. Can you please provide a working example of this? I am trying to preload vaules using the "$read file" function.

 

Sure, here's an example

 

ui html panel("<input type=\"text\" value=\"my text\" variable=\"#var1\">", 45)

 

When you load that bot the variable #var1 should be set to "my text".

Link to post
Share on other sites

Sure, here's an example

 

ui html panel("<input type=\"text\" value=\"my text\" variable=\"#var1\">", 45)

 

When you load that bot the variable #var1 should be set to "my text".

Is it possible to preload the text box variable value by reading a file, like it was in v3.5?

I have been trying to do this, but have not been successful so far in v4.

Link to post
Share on other sites

Is it possible to preload the text box variable value by reading a file, like it was in v3.5?

I have been trying to do this, but have not been successful so far in v4.

 

Could you elaborate on what you are trying to do? Are you talking about in the ui html panel? If you show how you would do it in v3 I can explain better if and how it is possible to do what you want :).

Link to post
Share on other sites

good question about populating ui elements from a file, I've been wanting to see this for a while, i think it would be very beneficial.

 

What he means I think eddie, if I had to provide an example...

 

The end user would be able to click a 'load' button for example at which point the user could pre-populate the UI elements with values from say, a previous project.

 

Or, another example would be, the developer wanting to populate the fields with some default value when bots are opened.

Link to post
Share on other sites
  • 8 months later...

Hi All,

 

This is exactly what ive been looking for a few hours.

 

Any progress ?

 

With regards,

 

Robin

 

good question about populating ui elements from a file, I've been wanting to see this for a while, i think it would be very beneficial.

 

What he means I think eddie, if I had to provide an example...

 

The end user would be able to click a 'load' button for example at which point the user could pre-populate the UI elements with values from say, a previous project.

 

Or, another example would be, the developer wanting to populate the fields with some default value when bots are opened.

Link to post
Share on other sites

You can do that now, with UI button

 

in there, drag in the set variable, in that add the prompt function.

it will prompt the user to enter a name of the project (ie folder name where files are stored)

 

then set your variable's with the read file attributes from the folder they supplied in prompt, and it will update your UI area items.

Link to post
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.

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.

Loading...
×
×
  • Create New...