Jump to content
UBot Underground

Defining a Variable


Recommended Posts

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?

Link to post
Share on other sites

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")
   }
}

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