Jump to content
UBot Underground

How? Finding two images and click it.


Recommended Posts

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. :)
 
Link to post
Share on other sites

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")
  • Like 2
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...