corvuscorax 0 Posted December 14, 2014 Report Share Posted December 14, 2014 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.... Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 14, 2014 Report Share Posted December 14, 2014 clear listadd list to list ( list from text ( table cell for content, delimiter being a space as your using in your csv)) now grab list item 0 for username and list item 1 for password to fill in the areas. 1 Quote Link to post Share on other sites
arunner26 51 Posted December 14, 2014 Report Share Posted December 14, 2014 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 ---")} 2 Quote Link to post Share on other sites
corvuscorax 0 Posted December 15, 2014 Author Report Share Posted December 15, 2014 Thank you very much for helping!!! Check this out now... thx Quote Link to post Share on other sites
corvuscorax 0 Posted December 18, 2014 Author Report Share Posted December 18, 2014 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/8i7IE93wvhghttp://www.screencast.com/t/WMCVaLfI2ehttp://www.screencast.com/t/Orw6RYJq2w Thanks for helping Quote Link to post Share on other sites
arunner26 51 Posted December 19, 2014 Report Share Posted December 19, 2014 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")} Quote Link to post Share on other sites
corvuscorax 0 Posted December 20, 2014 Author Report Share Posted December 20, 2014 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 :) :) :) :) :) Quote Link to post Share on other sites
arunner26 51 Posted December 20, 2014 Report Share Posted December 20, 2014 corvuscorax,Glad to hear it is working for you!! Quote Link to post Share on other sites
corvuscorax 0 Posted December 23, 2014 Author Report Share Posted December 23, 2014 (edited) 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 December 23, 2014 by corvuscorax Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.