9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 27, 2019 11:12:52 GMT
你好, 請問使用snapandplay 如何修改內容為 找到目標才進行一下?
是不是可以使用waitclick 功能?
------ 1 -----
touchList[index] = {target = "1.png", region = Region(595, 846, 110, 110), id = "1", action = 'click(matchResult); wait(2)'}
index = index + 1
------ 2 -----
touchList[index] = {target = "2.png", region = Region(379, 1592, 110, 110), id = "2", action = 'click(matchResult); wait(2)'}
index = index + 1
------ 3 -----
touchList[index] = {target = "3.png", region = Region(469, 1781, 110, 110), id = "3", action = 'click(matchResult); wait(2)'}
index = index + 1
------ 4 -----
touchList[index] = {target = "4.png", region = Region(486, 1779, 110, 110), id = "4", action = 'click(matchResult); wait(2)'}
index = index + 1
|
|
|
AnkuLua 發表於 Dec 27, 2019 14:50:05 GMT
你好, 請問使用snapandplay 如何修改內容為 找到目標才進行一下? 是不是可以使用waitclick 功能? ------ 1 ----- touchList[index] = {target = "1.png", region = Region(595, 846, 110, 110), id = "1", action = 'click(matchResult); wait(2)'} index = index + 1 ------ 2 ----- touchList[index] = {target = "2.png", region = Region(379, 1592, 110, 110), id = "2", action = 'click(matchResult); wait(2)'} index = index + 1 ------ 3 ----- touchList[index] = {target = "3.png", region = Region(469, 1781, 110, 110), id = "3", action = 'click(matchResult); wait(2)'} index = index + 1 ------ 4 ----- touchList[index] = {target = "4.png", region = Region(486, 1779, 110, 110), id = "4", action = 'click(matchResult); wait(2)'} index = index + 1 不懂您的意思 找到目標才進行一下 
|
|
9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 27, 2019 16:37:42 GMT
抱歉, 我的意思是 當找到圖一時, 有按下之後才會執行 找圖二的判斷
補充一下現在的情況, 是會不斷 1,2,3,4 的循環下去 感覺只是錄影回放, 並沒有判斷有沒有找到圖1, 就會跑一下行
|
|
|
AnkuLua 發表於 Dec 27, 2019 23:22:57 GMT
類似這樣?
------ 1 ----- touchList[index] = {target = "1.png", region = Region(595, 846, 110, 110), id = "1", action = 'png1 = true; click(matchResult); wait(2)'} index = index + 1
------ 2 ----- touchList[index] = {target = "2.png", region = Region(379, 1592, 110, 110), id = "2", action = 'if (png1) then png2 = true; click(matchResult); wait(2) end' } index = index + 1
------ 3 ----- touchList[index] = {target = "3.png", region = Region(469, 1781, 110, 110), id = "3", action = 'if (png2) then png3 = true; click(matchResult); wait(2) end'} index = index + 1
------ 4 ----- touchList[index] = {target = "4.png", region = Region(486, 1779, 110, 110), id = "4", action = 'if (png3) then png4 = true; click(matchResult); wait(2) end'} index = index + 1
|
|
9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 28, 2019 9:07:28 GMT
我試跑一下, 但感覺應該是這樣, 謝謝!!
|
|
9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 28, 2019 10:06:07 GMT
運行了30分鐘, 還是會發生亂點的情況 請問如何才能提昇抓圖的準確性? 要抓大範圍一點嗎?
|
|
|
AnkuLua 發表於 Dec 28, 2019 11:53:47 GMT
運行了30分鐘, 還是會發生亂點的情況 請問如何才能提昇抓圖的準確性? 要抓大範圍一點嗎? 可以抓大一點,或是提升相似度
|
|
9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 28, 2019 12:35:30 GMT
   以上是我的設定, 請問正常嗎? 我有試一下範圍設更大, 感覺更加抓不到 另外為什麼圖片看起來全黑的?
|
|
|
AnkuLua 發表於 Dec 28, 2019 12:57:22 GMT
|
|
9lin
Junior Member

Posts: 10
|
9lin 發表於 Dec 28, 2019 14:44:28 GMT
謝謝你, 轉用了daemon之後就成功了
|
|