|
Post by scy123 on Jun 10, 2017 12:44:47 GMT
Hello, I have no programming experience. I was just looking for a sample script so I can just edit the pics and such to my liking.
The script I need is very simple. I have 7 images, I need the script to scan for any of these images and click them if they show up and keep looping like this forever.
|
|
|
Post by AnkuLua on Jun 10, 2017 14:51:15 GMT
|
|
|
Post by scy123 on Jun 10, 2017 18:19:36 GMT
Oh that seems perfect. Just have to get it working. I wrote about my problems in the link you provided.
|
|
|
Post by scy123 on Jun 10, 2017 19:15:24 GMT
On the original topic, I found that the brute force method works for what I need. I just have 1 problem with the script (I posted it below) pics 2 and 3 are always on the screen and only needs to be clicked once. they change color once they are clicked, but the script keeps clicking them. Any way I can get it to click only once?
-- ========== Settings ================ Settings:setCompareDimension(true, 1440) Settings:setScriptDimension(true, 1440)
Settings:set("MinSimilarity", 0.8) setImmersiveMode(true)
-- ========== main program ===========
while (true) do existsClick("1.png", 0) existsClick("2.png", 0) existsClick("3.png", 0) existsClick("4.png", 0) existsClick("5.png", 0) existsClick("6.png", 0) existsClick("7.png", 0) end
|
|
|
Post by barkingbarnacle on Jun 10, 2017 19:50:45 GMT
Maybe up the similarity, or use a region with the image.
reg1 = Region(x, y, w, h)
reg1:existsClick("1.png")
A simple sample of region with clicking.
|
|
|
Post by scy123 on Jun 10, 2017 20:08:50 GMT
I guess the easiest would be to up the up the similarity. Would raising the number lower or raise similarity?
|
|
|
Post by scy123 on Jun 10, 2017 22:51:24 GMT
Alright, I played with the similarity for a bit and the script works like I wanted it to.
|
|