2015-05-25 69 views
0

我的腳本工作正常。但大多數情況下它很難點擊目標像素。因爲它大部分只是在側面點擊(我猜它只是點擊它看到的第一個像素,這是一個正方形的邊像素)任何想法如何點擊pixelsearch中的中間區域?點擊pixelsearch內部的特定區域?

http://i60.tinypic.com/eg7fb6.jpg

Loop { 
;<<-- this is the color of green boxed pixel 
PixelSearch, X, Y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, 0x00FF00, 0, fast 
     if(ErrorLevel=0) { 
     MouseClick, left, %X%, %Y% 
     sleep, 500 


     } 
     else { 

      send {f9} 

     } 
    } 
return 

回答

0

你可以簡單地改變點擊座標,不是嗎?

PixelSearch, X, Y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, 0x00FF00, 0, fast 
if(ErrorLevel=0) { 
    newX := X + 50 
    newY := Y + 50 
    MouseClick, left, %newX%, %newY% 
} 

另一個建議:使用而不是PixelSearch

+0

啊,或者一個雙搜索圖片搜索? –

+0

謝謝它的作品! :d –