Jump to content
UBot Underground

Loading Csv Data In Ui Dropdown Menu


Recommended Posts

I wanted to create a bot that is logging in my gmail accounts.

 

The problem is that I cannot setup the UI Dropdown Menu the right way. I have made a csv with usernames in the first column, and the passwords in the second column.

 

So, I want that the UI Dropdown Menu takes the Username and the password and fill it in the gmail login form.

 

It works only the half, because it fills the username and hits the login button.

 

How can I do it the right way? How to format the csv, tha ubot can understand the tables?

 

Thx for helping.

 

Excuse my spelling, my motherlanguage is german.... :wub:

 

 

 

post-18832-0-36115400-1418574700_thumb.jpg

Link to post
Share on other sites

corvuscorax,

Here is some code I have for that:

Note: The first three commands you would probably want to put in their own define and call them by button or onload.

 

clear list(%Usernames)
create table from file("C:\\Users\\Andy\\Documents\\AccountsList.csv"&AccountList)
add list to list(%Usernames$plugin function("TableCommands.dll""$list from table"&AccountList"Column", 0), "Delete""Global")
ui drop down("UserNames:"$text from list(%Usernames","), #UsernameSelection)
ui stat monitor("Username Used For Login"#UsernameSelection)
ui stat monitor("Password Used For Login"#PasswordSelection)
ui button("Login") {
    LoginCode()
}
define LoginCode {
    set(#TableLookupIndex, 0, "Global")
    loop($list total(%Usernames)) {
        if($comparison(#UsernameSelection"="$table cell(&AccountList#TableLookupIndex, 0))) {
            then {
                set(#UserNameFoundIndex#TableLookupIndex"Global")
                set(#PasswordSelection$table cell(&AccountList#UserNameFoundIndex, 1), "Global")
            }
            else {
            }
        }
        set(#TableLookupIndex$add(#TableLookupIndex, 1), "Global")
    }
    comment("--- add additional loging code here ---")
}

  • Like 2
Link to post
Share on other sites

Hi,

I need your help again...

 

I have customized your script and it works really fine!

 

But only in Ubot....

 

If I save the script and open it next day, then the dropdown is empty, but the filepath is right.

 

If I compile the bot the Dropdown is empty...

 

Don't know why...

 

Check this out:

http://www.screencast.com/t/8i7IE93wvhg

http://www.screencast.com/t/WMCVaLfI2e

http://www.screencast.com/t/Orw6RYJq2w

 

Thanks for helping :)

Link to post
Share on other sites

Hi,

I need your help again...

corvuscorax,

See my NOTE above: The first three commands you would probably want to put in their own define and call them by button or onload.

It will look something like this if you skip the define and just put the 3 commands in the on load command:

 

on load("Bot Loaded") {

     clear list(%Usernames)

     create table from file("C:\\Users\\Andy\\Documents\\AccountsList.csv"&AccountList)

     add list to list(%Usernames$plugin function("TableCommands.dll""$list from table"&AccountList"Column", 0), "Delete""Global")

}

Link to post
Share on other sites

corvuscorax,

See my NOTE above: The first three commands you would probably want to put in their own define and call them by button or onload.

It will look something like this if you skip the define and just put the 3 commands in the on load command:

 

on load("Bot Loaded") {

     clear list(%Usernames)

     create table from file("C:\\Users\\Andy\\Documents\\AccountsList.csv"&AccountList)

     add list to list(%Usernames$plugin function("TableCommands.dll""$list from table"&AccountList"Column", 0), "Delete""Global")

}

 

Hi,

 

Thank you very much, now it is working!

 

I am a total newbie at Ubot and need help sometimes, thank you very much.

 

greets from Austria

 

:) :) :) :) :) :) :) :) :) :)

Link to post
Share on other sites

Now I have the same problem, when I want to set up the UI open file button. How can I load the csv file in the dropdown menu when I use the open file button?

 

I think I have a problem with the lists and tables understanding. Is there anywhere a tutorial about this?

THX for helping..

 

This is the code by now, don´t know how to go on....

 

ui open file("Searching 4 File:",#UsernameFile)
ui drop down("Choose Username:",$list from file(#UsernameFile),#UsernameFilegewhlt)
ui stat monitor("Username Used For Login:",#UsernameFilegewhlt)

Edited by corvuscorax
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...