|
Post by xxdark33xx on Feb 7, 2017 22:03:04 GMT
Can somebody make me an example script that clicks a button (volume down) when a certain image appears on screen after waiting a couple seconds. And then it clicks an area of my screen (x,y)(I'll full this in) much appreciated, thanks
|
|
|
Post by Mercobots on Feb 7, 2017 23:07:47 GMT
hi
i don't know if you want simulate the volume down or is a image
but here is my help
local img = Pattern("img.png") local time = 5 -- in seconds local btn_vlm_down = Pattern("btn_vlm_down.png") local screen_loc = Location(x,y)
if (wait(img)) then wait(time) if (click(btn_vlm_down)) then click(screen_loc) end end
|
|
|
Post by xxdark33xx on Feb 7, 2017 23:20:18 GMT
I wanted to simulate the button press for volume down if the image appears then click a location
|
|
|
Post by Mercobots on Feb 7, 2017 23:50:26 GMT
I wanted to simulate the button press for volume down if the image appears then click a location hum... you need keyevent()local img = Pattern("img.png") local time = 5 -- in seconds local vol_down = 25 -- code for volume down local vol_up= 24 -- code for volume up
local screen_loc = Location(x,y)
if (wait(img)) then
wait(time)
keyevent(vol_down )
click(screen_loc)
end
|
|