Jump to content
UBot Underground

Ui List Box Variable Name To Actual Name, Change?


Recommended Posts

I want to use a twitter search selection in my UI, and I named the values with normal names (Tweets, Users, etc.). However, the problem is that the operands in twitter search are: f=tweets   f=users etc. Is there a simple way to tie each variable name to the corresponding search operand? I know that I could just put the operands into the UI, but I want the end users to see normal text, and I know that I can use an if statement for each, but I want to use as little code to achieve this as possible. What is a good and simple way to achieve this?

 

Example Code:

ui text box("Twitter Search Term:",#twit search term)
ui list box("Search Types:","Tweets,Users,Images,Videos,News,All",#search type)
ui drop down("Language:","English,Spanish,French,German",#search language)
navigate("https://twitter.com/search?{#search type}&q={#twit search term}{#search language}","Wait")
wait($rand(1,3))

So as it is now, I just have the UI variables set, and the navigate uses the variables to fill in the parts of the search URL that I want to have selectable by the end user. Is there a better way to do this? I don't like using the method that fills in the search box manually, as it is more complicated and cumbersome than just appending a search URL.

Link to post
Share on other sites

Option 1

ui text box("Twitter Search Term:",#twit search term)
ui list box("Search Types:","Tweets,Users,Images,Videos,News,All",#search type)
ui drop down("Language:","English,Spanish,French,German",#search language)
in shared browser {
    set visibility("Invisible")
    navigate("https://twitter.com/search?{#search type}&q={#twit search term}{#search language}","Wait")
    wait for browser event("Everything Loaded","")
    wait(1)
    set(#Html,$document text,"Global")
}
load html(#Html)
wait($rand(1,3))

Option 2
 

post-5560-0-69600000-1478138112_thumb.jpg

Link to post
Share on other sites

Thank you Pash! Unfortunately, that is not what I was asking though. :(

 

I want to understand a way to alter variables. Like for example, any given variable that has multiple options (Values separated by commas), the variable becomes the values set in the UI element. I want to display a specific set of variables in the dropdown or list box, but then have that variable set to a different text string.

 

For example:

 

"Tweets" in the dropdown

Becomes "f=tweets" when the variable is passed to the navigate command.

 

Sorry if I was confusing in the OP, it is an obscure request, I know.

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