steelersfan 38 Posted July 26, 2016 Report Share Posted July 26, 2016 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... Quote Link to post Share on other sites
HelloInsomnia 1103 Posted July 26, 2016 Report Share Posted July 26, 2016 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. Quote Link to post Share on other sites
steelersfan 38 Posted July 27, 2016 Author Report Share Posted July 27, 2016 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. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted July 27, 2016 Report Share Posted July 27, 2016 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 { } } 1 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.