click on image text
Posted: 13 Apr 2024, 08:33
so at the start it clicks on a coordinate. (opens game menu aka "add bonus" in the video where the images i want to find are) so in that part there could be different images from the image list showing or only one or none, doesnt matter. If it doesnt find image from the list then it tries to find other image from the list. Not break. If there is multiple images showing then it will just click randomly at one of them. (menu disappears here) and after that it will click back at the same coordinate at the start. (the one that opened the menu) and this cycle will basically repeat as long as I hold g.
Important ! :
Also there are parts where there is mouse hovering as can be seen in the video. I think that requires the mousehover code. Basically as can be seen, it will have a secondary hotkey such as j, so when I hold j, this time again, same process basically, at the start we click at a coordinate (add clause button in the video) and then the menu opens, but this time we will mouse hover on the image. Then after that when it detects other image it clicks on that image. Same stuff i guess but with mouse hover. If it doesnt find image then it tries to find other image from the list. Not break. If it cant find any image, wont do anything.
video: https://gyazo.com/216f1e8458f1af8688ba7c1626e6ddda
this code i have doesnt work as intended : (experimental, im going to have like 20 images here.)
Important ! :
Also there are parts where there is mouse hovering as can be seen in the video. I think that requires the mousehover code. Basically as can be seen, it will have a secondary hotkey such as j, so when I hold j, this time again, same process basically, at the start we click at a coordinate (add clause button in the video) and then the menu opens, but this time we will mouse hover on the image. Then after that when it detects other image it clicks on that image. Same stuff i guess but with mouse hover. If it doesnt find image then it tries to find other image from the list. Not break. If it cant find any image, wont do anything.
video: https://gyazo.com/216f1e8458f1af8688ba7c1626e6ddda
this code i have doesnt work as intended : (experimental, im going to have like 20 images here.)
Code: Select all
g::
CoordMode, Mouse
CoordMode, Pixel
imageList := ["C:\Users\izzet\Desktop\Yeni klasör\goalbonus.png", "C:\Users\izzet\Desktop\Yeni klasör\assistbonus.png"]
for each, image in imageList {
ImageSearch, FoundX, FoundY, 1114, 328, 1450, 800, % "*10 " image
if (ErrorLevel = 2) {
MsgBox, % "Problem loading " image
ExitApp
}
if ErrorLevel {
Send, {Click}
Sleep, 200
} else {
MouseGetPos, xpos, ypos, WinUMID
MouseClick, Left, FoundX, FoundY
WinActivate, ahk_id %WinUMID%
MouseMove, xpos, ypos
}
}
return