Jump to content
UBot Underground

Randomly select one of 2 radio buttons


Recommended Posts

Okay, just bought Ubot (fantastic!) and hit a problem.

On a page I get the male / female choice where I have to click a radio button - is there a quick way of making ubot randomly select one of those buttons?

 

Cheers and apologies in advance - I may be back with more stupid questions as I explore Ubot some more!

 

M.

Link to post
Share on other sites
Guest luminus

Here's a script that does exactly what you need. I used a simple $rand function to set a variable (#gender) equal to a random number between 1 and 3. Then I have an if function choosing the attribute for the male check box if $rand = 1 and choosing female if $rand = 2. Then click chosen!

 

Download script: http://www.botsoftware/org/bots/gender.ubot

http://www.botsoftware.org/bots/gender.png

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