

So we will make a ImageSearch in a small area, then click in the Like (if found), then change the area of the imagesearch and search again, then click. We can manage that by detecting "Likes" in smaller areas, instead of the whole screen. Never will search for the second, third, etc. When you press F7, the mouse cursor will move to the first occurance of the "Like" image. MouseMove, OutX, OutY Moves the mouse to the position of found image If not, just save another imge file with many of the "like" images on it, and run this code: So, we will have to search in rectangles, from up to down. This means that, if you have many "like" buttons in the same screen, ImageSearch will always find the first one, and will not search the others.

It can the "Lik" "ike" "ke", any you want, just try.ģ)Now, imagesearch will detect the first occurance of the image, and then will do not do anything. It's not necessary the "Like" word appears completely. If a message box appears with the text "The image was found!", it means it will work. Now, go to the browser and press "F7" key. Replace the "ImageFile" for the root to your file (example: C:\Images\Like.png". ImageSearch, OutX, OutY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, ImageFile This code i leave will search for the image you specify in the whole screen.

So you will have to open your facebook, place yourself somewhere you can see a "Like" button. We will assign the key "F7" the action to check if that image exists in current screen.

Try the image not having borders, so just the "Like" will fit in a rectangle with no white pixels around (just like the image i attach).Ģ)Let's make a test to see if it will work. Here the image would be "Me gusta", in Enligsh "Like". I will leave you one, but it's in spanish (as im from Argentina). 1)You should have an image with the "like" button.
