gfpoow 0 Posted February 1, 2012 Report Share Posted February 1, 2012 is possible for ubot to click from random urls ?example:there is 3 urlshttp://domain.com/?id=4321http://domain.com/?id=1234http://domain.com/?id=4123i use locator http://domain.com/?id=* with wildcardhow to make only 1 click from the 3 random urls above?is possible for ubot? (i prefer use click than navigate) any help, i will appreciate it. thanks Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted February 1, 2012 Report Share Posted February 1, 2012 add list to listscrape the urls to a list then click (<href="(random list item)">) this obviously isnt the exact code but hopefully that helps if not I can whip up an exact example if needed.. Quote Link to post Share on other sites
gfpoow 0 Posted February 1, 2012 Author Report Share Posted February 1, 2012 thanks, it works Quote Link to post Share on other sites
orbital 15 Posted August 26, 2012 Report Share Posted August 26, 2012 add list to listscrape the urls to a listthen click (<href="(random list item)">)this obviously isnt the exact code but hopefully that helps if not I can whip up an exact example if needed.. I would appreciate some further guidance on this. I am trying to do the same thing. I have this so far. click(<href="($random list item(%links), "Wait")">, "left click", "no") but ubot doesn't like the code. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 26, 2012 Report Share Posted August 26, 2012 what site url can i use as example for you that would help with what your trying to do.. Quote Link to post Share on other sites
orbital 15 Posted August 27, 2012 Report Share Posted August 27, 2012 what site url can i use as example for you that would help with what your trying to do.. here is my code but it doesnt work. ui window("Swag bucks login info") { ui text box("Email", #username) ui text box("Password", #password) } clear list(%links) clear list(%keywords) ui open file("Keyword List", #keywords) navigate("http://www.swagbucks.com/", "Wait") type text($element offset(<email field>, 0), #username, "Standard") type text($element offset(<password field>, 0), #password, "Standard") click(<login button>, "Left Click", "No") wait for browser event("Page Loaded", "") add list to list(%keywords, $list from file(#keywords), "Delete", "Global") change attribute(<id="q">, "value", $next list item(%keywords)) click(<id="hSearchSubmit">, "Left Click", "No") wait for browser event("Page Loaded", "") if($search page("We just want to make sure you\'re not a robot.")) { then { type text(<name="captchaword">, $solve captcha(<id="captchaImg">), "Standard") click(<type="image">, "Left Click", "No") } else { } } add list to list(%links, $scrape attribute(<onmousedown=w"cc2*">, "href"), "Delete", "Global") wait(3) click(<href=$random list item(%links)>, "Left Click", "No") wait(4) run javascript("history.go(-1);") click(<class="lnkWord">, "Left Click", "No") clear list(%links) loop($list total(%keywords)) { change attribute(<id="field">, "value", $next list item(%keywords)) click(<id="button">, "Left Click", "No") wait for browser event("Page Loaded", "") add list to list(%links, $scrape attribute(<onmousedown=w"cc2*">, "href"), "Delete", "Local") wait(2) set(#randomLink, $random list item(%links), "Local") click(<href=#randomLink>, "Left Click", "No") wait(4) run javascript("history.go(-1);") click(<class="lnkWord">, "Left Click", "No") clear list(%links) pause script } Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 27, 2012 Report Share Posted August 27, 2012 add list to list(%links, $scrape attribute(<onmousedown=w"cc2*">, "href"), "Delete", "Local") inside the loop at the end you ahve set to local when it should be global is why its not working.It works the first time then not in the loop if im looking and evaluating correctly from running it. Change it to global in the loop , remove the pause and your golden 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.