Jump to content
UBot Underground

Checking User Input Before Bot Starts?


Recommended Posts

I am working on a bot that allows the user to select a search engine and it's location (.com/.ca/.co.uk). To achieve this, I have split two UI inputs into 2 different variables. I am wondering, how can I make a check and output to the user that they must select both before the bot starts? If they are both selected in the UI, then the bot simply navigates to the url made out of both variables. I hope this makes sense to readers, I am at a loss for what to do. I have used several different qualifiers with "if" to no avail... :(

Link to post
Share on other sites

What inputs are you using?

You could use dropdowns that way one item is always selected and you control the items.

 

Otherwise you would be checking to see if something is blank and then possibly even if it matches a certain regex or something, each case is different.

Link to post
Share on other sites

What inputs are you using?

 

You could use dropdowns that way one item is always selected and you control the items.

 

Otherwise you would be checking to see if something is blank and then possibly even if it matches a certain regex or something, each case is different.

 

I'm using listboxes, one has "www.google" or "www.bing" for example, and the other has ".com" and ".ca". Without the quotes.

Link to post
Share on other sites

Okay, I suppose you could do it this way:

ui list box("Site:","www.google,www.bing",#site)
ui list box("Location:",".com,.ca,.co.uk,.mx",#location)
if($comparison(#site,"=",$nothing)) {
    then {
        alert("Please choose a site first.")
        stop script
    }
    else {
    }
}
if($comparison(#location,"=",$nothing)) {
    then {
        alert("Please choose a location first.")
        stop script
    }
    else {
    }
}
  • Like 1
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...