AutoHotKey - clik on image

雨燕双飞 提交于 2019-12-25 17:18:40

问题


I'd like to change send {Browser_Back} to a mouse click in a specific image / or a specific point (pixel).

SendMode , Input
SetMouseDelay , -1
SetBatchLines , -1
Loop
{
    ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , mor.png
    bT := ErrorLevel ? bT : 1
    ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic2.png
    bT := ErrorLevel ? bT : 1
    ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic3.png
    bT := ErrorLevel ? bT : 1
    If bT
    {
        bT := 0
        Send , {Browser_Back}
        Sleep , 100
}   }
Return
f1::ExitApp

回答1:


No problem, just replace the Send , {Browser_back} line with Click , 500 , 500. Replace the 500s with the x- and y-coordinates of where you want to click.




回答2:


Random clicking in the given area

x, from pixel to pixel, y, from pixel to pixel

example

Random, x, 1130,1300
Random, y, 580, 680
Click %x% %y%


来源:https://stackoverflow.com/questions/54474799/autohotkey-clik-on-image

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!