|
herotoro 發表於 Jul 10, 2018 13:51:47 GMT
您好,以下是錄製腳本的內容,我想請問如果我想要偵測到自動進行中.JPG就不執行12和13的動作,腳本內容該如何修改?
------ 11 -----
touchList[index] = {target = "自動進行中.png", region = Region(933, 511, 300, 300), id = "自動進行中", action = 'click'}
index = index + 1
------ 12 -----
touchList[index] = {target = "主角.png", region = Region(1079, 525, 300, 300), id = "主角", action = 'click'}
index = index + 1
------ 13 -----
touchList[index] = {target = "自動進行.png", region = Region(179, 490, 300, 300), id = "自動進行", action = 'click'}
index = index + 1
|
|
|
AnkuLua 發表於 Jul 10, 2018 13:56:27 GMT
------ 12 -----
touchList[index] = {target = "主角.png", region = Region(1079, 525, 300, 300), id = "主角", action = 'if (not exists("自動進行中.png", 0) then click(matchResult) end'}
index = index + 1
------ 13 -----
touchList[index] = {target = "自動進行.png", region = Region(179, 490, 300, 300), id = "自動進行", action = 'if (not exists("自動進行中.png", 0) then click(matchResult) end'}
index = index + 1
還有,建議檔名不要用中文,可能在有些機器會出問題
|
|
|
herotoro 發表於 Jul 11, 2018 17:58:08 GMT
改完還是有問題 ------ 11 ----- touchList[index] = {target = "真的開始遊戲.png", region = Region(933, 511, 300, 300), id = "真的開始遊戲", action = 'click'} index = index + 1 ------ 12 ----- touchList[index] = {target = "主角.png", region = Region(1033, 479, 255, 241), id = "主角", action = 'if (not exists("auto.png", 0) then click(matchResult) end'} index = index + 1 ------ 13 ----- touchList[index] = {target = "自動進行.png", region = Region(179, 490, 300, 300), id = "自動進行", action = 'if (not exists("auto.png", 0) then click(matchResult) end'} index = index + 1 ------ 14 ----- touchList[index] = {target = "勝利.png", region = Region(489, -50, 300, 300), id = "勝利", action = 'click'} index = index + 1 錯誤訊息 執行說明
|
|
|
AnkuLua 發表於 Jul 11, 2018 23:59:25 GMT
抱歉,少一個右括弧 action = 'if (not exists("auto.png", 0)) then click(matchResult) end'
|
|