botoballs 2 Posted December 1, 2014 Report Share Posted December 1, 2014 Hi I'm doing a project on searching two or the same images and clicking on either of them. Does anyone know a setup for this?Here is the complete DIV element: <div class="toys" id="so10"> <img src="8" style="cursor:pointer;width:62px" onclick="checkClick ("gs2zfk")" id="image1"> <img src="./img/dir/10.png" style="cursor:pointer;width:70px" onclick="checkClick ("1rthp8")"> <img src="./img/dir/9.png" style="cursor:pointer;width:60px" onclick="checkClick ("3v3t8s")"> <img src="./img/dir/1.png" style="cursor:pointer;width:70px" onclick="checkClick ("55whu7")"> <img src="./img/dir/1.png" style="cursor:pointer;width:43px" onclick="checkClick ("0my7q9")"> </div> What I want the bot to do is find images that are the same example above 1.png (different sizes) and click either one. Does anyone know of a simple setup?This help would really ease my day. Quote Link to post Share on other sites
blumi40 222 Posted December 2, 2014 Report Share Posted December 2, 2014 Hi botoballs depence on how your skills in Javascript.here is a js example i would use to do that http://jsfiddle.net/handtrix/YvQ5y/the logic behind is baseencode every img and compare each other... greetz Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted December 3, 2014 Report Share Posted December 3, 2014 This should work or small variation of it. load html("<div class=\"toys\" id=\"so10\"> <img src=\"8\" style=\"cursor:pointer;width:62px\" onclick=\"checkClick ("gs2zfk")\" id=\"image1\"> <img src=\"./img/dir/10.png\" style=\"cursor:pointer;width:70px\" onclick=\"checkClick ("1rthp8")\"> <img src=\"./img/dir/9.png\" style=\"cursor:pointer;width:60px\" onclick=\"checkClick ("3v3t8s")\"> <img src=\"./img/dir/1.png\" style=\"cursor:pointer;width:70px\" onclick=\"checkClick ("55whu7")\"> <img src=\"./img/dir/1.png\" style=\"cursor:pointer;width:43px\" onclick=\"checkClick ("0my7q9")\"> </div>") clear list(%dups) clear list(%scraped) add list to list(%scraped,$list from text($scrape attribute(<src=w"*">,"src"),$new line),"Don\'t Delete","Global") loop($list total(%scraped)) { set(#NLI,$next list item(%scraped),"Global") clear list(%dup check) add list to list(%dup check,$list from text($find regular expression(%scraped,#NLI),$new line),"Don\'t Delete","Global") if($list total(%dup check) = 2) { then { add item to list(%dups,#NLI,"Delete","Global") } } } click(<src=$list item(%dups,0)>,"Left Click","No") 2 Quote Link to post Share on other sites
UBotBuddy 331 Posted December 3, 2014 Report Share Posted December 3, 2014 I would need a site to test with but there is a way to get an accurate count as well as being able to focus on the image you want to click. Buddy Quote Link to post Share on other sites
giganut 109 Posted December 3, 2014 Report Share Posted December 3, 2014 I would need more information on what you need this to do and a site that it's on to make a working example. 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.