|
cross 發表於 Oct 6, 2017 16:08:01 GMT
Hi All, 我會先在橫屏執行一些動作後,會點一個APP,這APP是直屏的。 但橫屏轉直屏Region設定無法反應過來。 region:existsClick("SaoApp.png",0.5) wait(10) local screen = getAppUsableScreenSize() print(screen:getX()) -- the width of App usable screen print(screen:getY()) -- the height of App usable screen screen = getRealScreenSize() print(screen:getX()) -- the width of device real screen print(screen:getY()) -- the height of device real screen continueClick(Location(80, Skill),10) wait(5) Skill = 780+(Skill*120) RetryCount = 0 setImmersiveMode(true) Settings:setCompareDimension(true, 720) region = Region(0, 0, 720, 1280) region:highlight(); setHighlightStyle(0x8fffff00, true) regionShow = Region((720 / 2)-150, (1280/2)-30, 300, 60) 如下圖: link:Region local screen = getAppUsableScreenSize() print(screen:getX()) -- the width of App usable screen print(screen:getY()) -- the height of App usable screen screen = getRealScreenSize() print(screen:getX()) -- the width of device real screen print(screen:getY()) -- the height of device real screen 圖二: link:App usable screen請問要如何設定?
|
|
|
cross 發表於 Oct 6, 2017 18:28:12 GMT
Hi All, 找到問題了。 setImmersiveMode(true) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension)
要多這行才行。 Settings:setScriptDimension(true, scriptDimension)
|
|