I can only define the top area of the screen, I can't start from the bottom
Region:
A Region is a rectangular area on a Screen and is defined by its upper left corner (x, y) being the pixel with this offset relative to the upper left corner of the screen (usually (0, 0) ) and its dimension (w, h) as its width and height in pixels.
Create the region with Region(x, y, w, h)
When I run the script it gives an error: User Abort! Admin please help me fix this script error.
Settings:setCompareDimension(true, 720)
Settings:setScriptDimension(true, 720)
Settings:set("MinSimilarity", 0.6)
----
while true do
if Region(0,0, 780, 130):existsClick("watch.png", 0) then
wait(1)
elseif existsClick("gift.png", 0) then
wait(1)
end
Region(0,0, 780, 130):existsClick("out1.png", 0)
Region(0,0, 780, 130):existsClick("out2.png", 0)
Region(0,0, 780, 130):existsClick("out3.png", 0)
Region(0,0, 780, 130):existsClick("out4.png", 0)
Region(0,0, 780, 130):existsClick("out5.png", 0)
Region(0,0, 780, 130):existsClick("out6.png", 0)
Region(0,0, 780, 130):existsClick("out7.png", 0)
Region(0,0, 780, 130):existsClick("out8.png", 0)
Region(0,0, 780, 130):existsClick("out9.png", 0)
wait(1)
Region(0,0, 780, 130):existsClick("out10.png", 0)
Region(0,0, 780, 130):existsClick("out11.png", 0)
Region(0,0, 780, 130):existsClick("out12.png", 0)
Region(0,0, 780, 130):existsClick("out13.png", 0)
Region(0,0, 780, 130):existsClick("out14.png", 0)
Region(0,0, 780, 130):existsClick("out15.png", 0)
Region(0,0, 780, 130):existsClick("out16.png", 0)
Region(0,0, 780, 130):existsClick("out17.png", 0)
Region(0,0, 780, 130):existsClick("out18.png", 0)
Region(0,0, 160, 160):existsClick("back.png", 0)
wait (1)
keyevent(4)
keyevent(4)
wait(2)
existsClick("no.png", 0)
existsClick("ok.png", 0)
wait (1)
keyevent(4)
keyevent(4)
keyevent(4)
wait(2)
existsClick("icon.png", 0)
wait(5)
end