Post by AnkuLua on Jan 25, 2016 12:29:03 GMT
* region searching exception will save regionException.png in /sdcard/AnkuLua/captured_images
* New Methods
numberOCRNoFindException(region, imagePrefix)
Exception not throwing exception, this method do the same thing as numberOCR.
This method returns two values. The first one is still the recognized number. The second one is the boolean value of success (true).
addEditNumber(argument, defaultValue)
addEditNumber will get a number (integer or float number) from user. The input will be assign to a new global variable argument.
addSpinner(argument, TableOfString, defaultValue)
addSpinner will get a string from one of the strings in table. The input will be assign to a new global variable argument.
touchDown(PSMRL [,seconds]), touchMove(PSMRL [,seconds]), touchUp(PSMRL [,seconds])
These three methods provides the most basic touch capabilities.
getLanguage()
Return the language setting in Android system
It could be used to support multi-language
getVersion()
Return the string of AnkuLua version
findAllNoFindException(PS)
It's the same as findAll() except that no exception will be thrown.
regionFindAllNoFindException(region, PS)
It's the same as regionFindAll() except that no exception will be thrown.
getDeviceID(), getIMEI(), getSIMSerial(), getIMSI(), getWiFiMAC()
All these functions return the corresponding IDs.
They could be used in scripts for sale.
setScanInterval(seconds), setScanRate(frequency), getScanInterval(), getScanRate()
Set the scan interval or rate. Interval is the inverse of frequency.
For scanning every 4 seconds, you can use either one of following
Note: These scan related functions are time-limited features in trial version.
* New Methods
numberOCRNoFindException(region, imagePrefix)
Exception not throwing exception, this method do the same thing as numberOCR.
This method returns two values. The first one is still the recognized number. The second one is the boolean value of success (true).
addEditNumber(argument, defaultValue)
addEditNumber will get a number (integer or float number) from user. The input will be assign to a new global variable argument.
addSpinner(argument, TableOfString, defaultValue)
addSpinner will get a string from one of the strings in table. The input will be assign to a new global variable argument.
allTroops = {"barbarian", "archer", "giant", "goblin", "wallBreaker",
"balloon", "wizard", "healer", "dragon", "PEKKA" }
addSpinner("training1", allTroops, allTroops[1])
touchDown(PSMRL [,seconds]), touchMove(PSMRL [,seconds]), touchUp(PSMRL [,seconds])
These three methods provides the most basic touch capabilities.
getLanguage()
Return the language setting in Android system
It could be used to support multi-language
function fileExists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function loadStrings(path)
local language = getLanguage()
local file = path.."strings."..getLanguage()..".lua";
if (fileExists(file)) then
dofile(file)
else
if (fileExists(path.."strings.lua")) then
dofile(path.."strings.lua")
end
end
end
getVersion()
Return the string of AnkuLua version
findAllNoFindException(PS)
It's the same as findAll() except that no exception will be thrown.
regionFindAllNoFindException(region, PS)
It's the same as regionFindAll() except that no exception will be thrown.
getDeviceID(), getIMEI(), getSIMSerial(), getIMSI(), getWiFiMAC()
All these functions return the corresponding IDs.
They could be used in scripts for sale.
setScanInterval(seconds), setScanRate(frequency), getScanInterval(), getScanRate()
Set the scan interval or rate. Interval is the inverse of frequency.
For scanning every 4 seconds, you can use either one of following
setScanInterval(4)
setScanRate(1/4)
getScanInterval() and getScanRate() return the corresponding values.Note: These scan related functions are time-limited features in trial version.