Lombi 34 Posted September 7, 2011 Report Share Posted September 7, 2011 So I've been thinking about making a directory submission bot a bit more automated and came up with a similar functionality that most automated russian submitters use - to scan dropdowns for series of keywords and if it exists in that dropdown, pick that choice. So the general idea is that a user writes the keywords in a keyword UI field (which is also used for filling the keyword/tag fields) and it explodes that list by a comma and does a regex search on the dropdowns one-by-one. Code (using "orado" as a keyword which is included in the dropdown choice "Colorado -- CO"): navigate("http://www.tizag.com/htmlT/htmlselect.php", "Wait") set(#opcija, $find regular expression($document text, ">(.*)orado(.*)</option"), "Global") set(#opcija, $replace(#opcija, ">", $nothing), "Global") set(#opcija, $replace(#opcija, "</option", $nothing), "Global") change dropdown($element offset(<tagname="select">, 1), #opcija) Obviously it's still limited by this bug, but once that gets fixed it's already working. Your thoughts? 1 Quote Link to post Share on other sites
Lombi 34 Posted December 19, 2011 Author Report Share Posted December 19, 2011 bump? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 19, 2011 Report Share Posted December 19, 2011 not a bug. remove your offset 1 and have it grab all the select options.add to a list and loop it looking for your keyword will it finds it then select it. Quote Link to post Share on other sites
JohnB 255 Posted December 19, 2011 Report Share Posted December 19, 2011 That's correct. Sometimes the selection defaults to an offset. You can just click on the advanced editor and choose the attribute without the offset. It is not a bug, it simply provides options to select one or multiple items. John Quote Link to post Share on other sites
Lombi 34 Posted December 20, 2011 Author Report Share Posted December 20, 2011 Pretty cool, thanks for the help. Managed to get this working :} Quote Link to post Share on other sites
vicky 0 Posted March 16, 2012 Report Share Posted March 16, 2012 hey i want to do similar thing but cant undersant the code as i m more faimilar with the node view.. I want to do is select from dropdownselect 1(if not avialble) or 2(n if its also not ) or select 3 etc 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.