michelinsy 1 Posted May 28, 2015 Report Share Posted May 28, 2015 Hi @ all, i'm new to ubot and just now i test out what is possible with ubot.My first littel scripts are made and i like to do automation without spending so much time for programming. Now i want to make the bots a little more complex and user friendly. For that i need help to understand some things. What is a good way/solution to handle querys and input during the bot is running? Example: When starting the bot you must fill in the ui pannel password and login. Then the bot is logging into a website and scrape a list with data. After that the list should shown to the user so that he can put one result. At the moment i use the ui listbox because i need the variable to work forward. When i finished creating the bot i have to much ui commands Is there a command to clear the ui pannel? Are you using "load html/js"? When yes, how do you make a variable which you can see in the debugger? Or is there a other solution i don't see? Thanks for help Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 28, 2015 Report Share Posted May 28, 2015 You can handle input while the bot is running, for example you can change the value of a ui element and have it change it real time. But you can't clear the UI or show the debugger in a compiled bot. If you have the dev version of Ubot you can make an HTML UI interface with tabs so they can see different UI layouts within the same bot. Quote Link to post Share on other sites
michelinsy 1 Posted May 28, 2015 Author Report Share Posted May 28, 2015 Superfast response, nice. I think to change the value is the way i been searching for. Do the value of an ui element in a compiled bot change too when i set it in the script before? How can i change the value? Is there a howto you know or can you explain it? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 28, 2015 Report Share Posted May 28, 2015 What I mean is if there is a textbox and the user puts in "helloinsomnia" and then later on changes it to be "michelinsy" then it will change that variable as well. So if the bot is running and you change a dropdown value from 1 to 2 it will update instantly in the bot. I hope this makes sense. You can test it by dragging in a ui text box then an alert command to alert what is written in the text box then a 10 second wait and another alert command. During the 10 second wait change whats in the text box and see that it changes in the variable in real time while the program is running. Like so: ui text box("input", #input) alert(#input) wait(10) alert(#input) Quote Link to post Share on other sites
michelinsy 1 Posted May 28, 2015 Author Report Share Posted May 28, 2015 ah, ok. That is not what i am looking for. When i create a checkbox in html and run js do you know how i can see the value in the debugger?I have set a new Variable and write input element and run js with the new variable. But i can't get a value at the debugger. Quote Link to post Share on other sites
michelinsy 1 Posted May 28, 2015 Author Report Share Posted May 28, 2015 Perhaps i should let it as it is and when i buy the dev version i can realized it with tabs, like you sad. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 28, 2015 Report Share Posted May 28, 2015 Can you post an example and I'll see if I can understand better. Quote Link to post Share on other sites
michelinsy 1 Posted May 28, 2015 Author Report Share Posted May 28, 2015 yes, but tomorrow. Thanks a lot Quote Link to post Share on other sites
Asentrix 17 Posted May 29, 2015 Report Share Posted May 29, 2015 (edited) I personally like using $prompt for logins.For example on load("Bot Loaded") { set(#checkpass, $prompt("Please Enter The Secret Password"), "Global") if(#checkpass = "SecretKeyExample") { then { alert("Login Successful!") comment("Login Was Successful") } else { alert("Login Failed!") comment("Login Failed.") navigate("http://failedloginexample.com", "Wait") wait for browser event("Everything Loaded", "") stop script } } }Extremely simple but just an example Edited May 29, 2015 by Asentrix Quote Link to post Share on other sites
michelinsy 1 Posted May 29, 2015 Author Report Share Posted May 29, 2015 (edited) Hi @Asentrix, thank you. I will test it. Hi @HelloInsomnia, i have solved the problem that the checkbox with js give me no value. I have to put the $eval function in the set command to show the value in the debugger. Edited May 29, 2015 by michelinsy Quote Link to post Share on other sites
Asentrix 17 Posted May 29, 2015 Report Share Posted May 29, 2015 No worries , good luck 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.