Jump to content
UBot Underground

Using loop while command and change drop down


Recommended Posts

Hello everyone, hopefully someone can help me since I am having difficulties with the "condition" part of the loop while command.

 

I managed to scrape the drop down menu options into a list. Then I use the loop while command to loop through and choose the option from the drop down menu using the change drop down command. I have placed a next list item function inside the change drop down command. However, I don't know how to make the loop stop once the correct option is selected. I would like to somehow compare the current selected option on the drop down menu with a variable. Also, is it possible to select an option from a drop down menu using a wildcard? This is the drop down menu I'm working with: http://bestphpdirectory.com/submit.php

 

Thanks

Link to post
Share on other sites

I'm not sure exactly what you mean, but it sounds relatively simple. What are you doing with the scraped options?

 

John

 

Here is the code I'm using:

 

 

ui drop down("Category:", "Health,Sports,Business,Technology", #category)

if($contains($scrape attribute(<name="CATEGORY_ID">, "innerhtml"), #category)) {

then {

add item to list(%scrape categories, $scrape attribute(<tagname="option">, "innertext"), "Delete", "Global")

save to file("{$special folder("Desktop")}\\categories.txt", %scrape categories)

add list to list(%scrape categories2, $list from file("{$special folder("Desktop")}\\categories.txt"), "Delete", "Global")

loop while($comparison($contains($next list item(%scrape categories2), #category), "=", $true)) {

change dropdown(<name="CATEGORY_ID">, $next list item(%scrape categories2))

}

}

else {

}

}

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