Post by AnkuLua on Oct 13, 2015 15:42:05 GMT
New Screenshot Method and Operation Settings
From Lollipop, Android provide built-in screenshot method, Media Projection.
AnkuLua supports Media Project from version 3.0.0. And Media Projection speed is faster since it's built-in.
At the same time, AnkuLua provide the free choice of screenshot and touch methods.
If the device is rooted, with daemon and above Lollipop, the following settings screen will be shown
About background touch: In this mode, the touch command will be sent and executed on background.
At the same time, other non screenshot nor touch commands could be executed.
When executing next screenshot or touch command, it will wait the previous command completed.
New Methods
continueClick(PSMRL, times [,timeout])
Method continueClick now support PSRML objects and timeout parameters. There is no return value.
continueClick could be called direct or from Region object.
longClick(PSMRL [,seconds])
stopLongClick()
Method longClick now provide option to don't assign duration.
If no seconds parameter, the longClick will last until next touch command or stopLongClick().
longClick("target.png") -- target will be clicked and the click last
setImmersiveMode(enable)
Some devices provide on-screen navigation bar.
Normally, the navigation bar could not be used by App.
In immersive mode, the navigation bar will disappear. And the original navigation bar area will be used by App.
If the App is in immersive mode, use this method. Otherwise, AnkuLua may not act as expected.
New Objects
Timer
With object timer, users can know the time consumed in some period.
Following methods are provided,
set()
Reset the timer.
Return value: the time (in seconds) from timer constructed or previous set.
check()
Return value: the time (in seconds) from timer constructed or previous set.
From Lollipop, Android provide built-in screenshot method, Media Projection.
AnkuLua supports Media Project from version 3.0.0. And Media Projection speed is faster since it's built-in.
At the same time, AnkuLua provide the free choice of screenshot and touch methods.
If the device is rooted, with daemon and above Lollipop, the following settings screen will be shown
About background touch: In this mode, the touch command will be sent and executed on background.
At the same time, other non screenshot nor touch commands could be executed.
When executing next screenshot or touch command, it will wait the previous command completed.
New Methods
continueClick(PSMRL, times [,timeout])
Method continueClick now support PSRML objects and timeout parameters. There is no return value.
continueClick could be called direct or from Region object.
longClick(PSMRL [,seconds])
stopLongClick()
Method longClick now provide option to don't assign duration.
If no seconds parameter, the longClick will last until next touch command or stopLongClick().
longClick("target.png", 2) -- target will be clicked for 2 seconds
longClick("target.png") -- target will be clicked and the click last
-- do anything except touch related methods
--
stopLongClick() -- now the click on target is released
longClick("target.png") -- target will be clicked and the click last
click("target2.png") -- click on target is reatarget2 is clicked
longClick("target.png") -- target will be clicked and the click last
setImmersiveMode(enable)
Some devices provide on-screen navigation bar.
Normally, the navigation bar could not be used by App.
In immersive mode, the navigation bar will disappear. And the original navigation bar area will be used by App.
If the App is in immersive mode, use this method. Otherwise, AnkuLua may not act as expected.
New Objects
Timer
With object timer, users can know the time consumed in some period.
Following methods are provided,
set()
Reset the timer.
Return value: the time (in seconds) from timer constructed or previous set.
check()
Return value: the time (in seconds) from timer constructed or previous set.
t = Timer()
wait(1)
print(t:check())
wait(1.2)
print(t:check())
wait(1.3)
print(t:set())
wait(1.5)
print(t:check())