imed 0 Posted September 3, 2011 Report Share Posted September 3, 2011 I'm trying to build a simple account creation bot, but I'm still very new to UBot. It's pretty easy to do if I want to use the UI commands to define the variables OR have them randomly generated. However, I'm trying to build in flexibility for the user so I have UI text boxes where the user can enter their desired information, but I've also added a UI checkbox called "Autogenerate". Basically, if the user would check this box if they would prefer to have the account info randomly generated, but I can't figure out how I would define the variable in this case. Conceptually, it should be something like this: ui text box("Username", #username) ui text box("Password", #password) ui text box("Email", #email) ui check box("Autogenerate?", #autogenerate) (I know below is not proper code...it is just an illustration of what I am trying to accomplish)IF #autogenerate = "true" THEN #username = $account data (username) #password = $account data (password) #email = $account data (email) ELSE ... Any thoughts on how I can accomplish something like this? Quote Link to post Share on other sites
Eddie Waller 158 Posted September 3, 2011 Report Share Posted September 3, 2011 I'm trying to build a simple account creation bot, but I'm still very new to UBot. It's pretty easy to do if I want to use the UI commands to define the variables OR have them randomly generated. However, I'm trying to build in flexibility for the user so I have UI text boxes where the user can enter their desired information, but I've also added a UI checkbox called "Autogenerate". Basically, if the user would check this box if they would prefer to have the account info randomly generated, but I can't figure out how I would define the variable in this case. Conceptually, it should be something like this: ui text box("Username", #username) ui text box("Password", #password) ui text box("Email", #email) ui check box("Autogenerate?", #autogenerate) (I know below is not proper code...it is just an illustration of what I am trying to accomplish)IF #autogenerate = "true" THEN #username = $account data (username) #password = $account data (password) #email = $account data (email) ELSE ... Any thoughts on how I can accomplish something like this? Here's a quick video on how you can use if statements with the ui checkbox. http://screencast.com/t/GYM6yyXi And here's the corresponding code: ui check box("yahoo", #go to yahoo) if(#go to yahoo) { then { navigate("yahoo.com", "Wait") } else { navigate("live.com", "Wait") } } 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.