Jump to content
UBot Underground

Preloading a file into the HTML UI


Recommended Posts

Does anyone know if it is possible to preload data from a .txt or .csv file into the HTML UI panel?

 

I have been trying to get it to work with JS, no luck at all.

 

Maybe there is a trick that someone knows of?

 

Basically, I would like to load a list of accounts, for example, into a dropdown.

 

The user can then select the account, then click on run, and the bot will do a look up on that user account information.

 

So the csv might look like....

 

Account 1, John, KS4sjI2, male, .....

 

Just Account 1 would show up and then when ran, the other variables could be populated with the corresponding data.

 

This may be a pipe dream, but I'm sure anyone could imagine a thousand uses for something like this.

 

Thanks

Link to post
Share on other sites

There was an example in the forum at one point showing this very thing...I can't find it right now, but it was something like this:

 

Use the include command to include a file with the html in it and use it as the content of the ui html panel. That way you can make changes to it without re-distributing the bot, etc...

 

I'll keep looking...it's here somewhere.

 

John

Link to post
Share on other sites

Thanks, I will take a look at that!

 

I also found the ui window late last night, which adds a settings tab. That looks like an awesome feature and definitely something I can use.

 

Can't find any documentation on UI window, is there a video I'm missing for this one? Searching for UI anything is impossible on here, can't search for words less than 3 characters.

 

From what I can tell, when you click settings and then the window you've added, it actually runs the code in the sub. But is it for only adding UI Elements (checkboxes, text boxes, etc)? Needs more playing with.

 

Thanks again!

Link to post
Share on other sites

Checking the ubot file you posted...

 

The code in the page that is loaded is this...

 

<body>

 

<form method="post">

<select variable="#category" fillwith="value" name="Select1" style="width: 272px">

<option value="1">Cars</option>

<option value="2">Boats</option>

<option value="3">Motorcycles</option>

<option value="4">Bicycles</option>

<option value="5">Skateboards</option>

</select></form>

 

</body>

 

I understand everything about how this works. However, I would like to be able to read in a csv or txt file, simply to pull values from. Seems possible, just need to figure it out.

 

A little testing shows that the UI window is only for setting variables. It doesn't appear to actually execute any of the programming. UI Stat monitors all show empty when adding them to the UI Window.

 

Search goes on... Trying to solve a big issue with a simple solution.

Link to post
Share on other sites

 

 

John, nice tut.

 

That still depends on clicking the play button. What I was wanting, was a way to pre-load info from a file, as soon as the program loads. There doesn't seem to be a function or sub for this at present.

 

I think I'm going to shoot for the run sub command and execute it from the UI HTML panel with a button click. So there will be a html button "load profiles" or similar, and that can run a sub that loads up the listbox. You're tut definitely gave me some ideas on how to do some stuff. If I get an elegant solution, I'll share here.

 

Thanks

Link to post
Share on other sites

Ok, so playing around (off and on) all day today. I've come to the conclusion that there is no real way for a user to interact with UI, other than presetting global variables that are either a selection or a boolean value.

 

To really get going and make something powerful with ubot, I would say it would almost be a requirement to be able to run subs from the HTML UI panel.

 

As previously mentioned, the biggest use I could see for this, is that it would allow for loading an account list.

 

I'm sure there are a thousand other uses, but that is the one I am particularly searching for right now.

 

Other uses, off the cuff...

Prefetch data off a server (if the mysql functions are added that I saw somewhere else on here)

Manipulate data in files (url cleaner, text spinner)

Save data post bot run (after inspecting the data manually)

 

This could allow bots to be used as standalones (offline) data manipulators for large amounts of data. Gives more options to offer to the end users.

 

I think this gets off the original topic and I will post a similar thread in the suggestions area. I just wanted to update that I was not successful in coming up with a way to preload data into the HTML UI.

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