跳到主要內容

Advance Mode API

Advance Mode:


 

 

getPixel(imageId,x,y,type)

  • return {color string}
type can be "long" or "hex"
eg: for color WHITE, long=16777215, hex=ffffff

eg: getPixel(0, 10,10,"hex");
0 is the screencaptured image id,
get the pixel x=10, y=10 from captured screen, with the result display using hex value

eg: getPixel(getImage("cache",0,50,50,100,100), 10,10,"long");
clip the image from screen capture for the range 50,50, 100, 100
and from that image get the pixel x=10, y=10 from captured screen, with the result display using long value

getJson(httpLink)

  • return {JS Object}

{ "X-Cloud-Trace-Context": "64e17d0cf7ab6e9e8c394dc816617c5f/1407216343458726882", "Upgrade-Insecure-Requests": "1", "Accept-Language": "en-US,en;q=0.5", "Host": "headers.jsontest.com", "DNT": "1", "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }

eg:var jsonValue= getJson("http://headers.jsontest.com/");
jsonValue.Host
result="headers.jsontest.com"

openApp(packageName,activityName)

  • void

swipe(x1,y1,x2,y2,time,hold)

  • void
time in millisecond
hold can be "true" or "false"

touch(x,y,time,hold)

  • void
time in millisecond
hold can be "true" or "false"

touch(time)

  • void
time in millisecond

keyAction(action)

  • void
Action can be "home","history","lock","back","stop"

toast(text,location,width,height,lines,time)

  • void
location can be top(49),center(17),Bottom(81),top left(51),top right(53),bottom left(83),bottom right(85)
Time is in millisecond, if set to -1 then it will stay on top

findImage(mainId, templateId, similarity)

  • return JS Array Object{x,y}
Similarity value can be from 1~100
return array object with {x,y}

if not found return ""
example usage
  var loc=findImage();
  loc.points.length
  loc.points[0].x
  loc.points[0].y

getImage(type=file,filePath)

  • return {imageId}
filePath get image from local disk

getImage(type=url,httpLink)

  • return {imageId}
httpLink the http link from the web

getImage(type=cache,imageId,x1,y1,x2,y2)

  • return {imageId}
imageId 0 is the last screen captured imageId

getImage(type=reference,pageId,imageDataIndex,x1,y1,x2,y2)

  • return {imageId}
pageId is a variable

openCV(imageId)

  • return {imageId}
It currently only does canny

ocrText(imageId,language)

  • return {text}
language can be "eng","jpn","kor"

findColor(imageId,type,colors)

  • return {boolean}
type can be "long","hex"
colors need to be use quotation if multi color is added eg:"color1, color2, color3"

showImage(imageId,location,width,height,time)

  • void
location can be top(49),center(17),Bottom(81),top left(51),top right(53),bottom left(83),bottom right(85)
Time is in millisecond, if set to -1 then it will stay on top

saveImage(imageId,filePath,format,compressLevel)

  • return {file name}
filePath the path start from your sdcard directory
format can be "png" or "jpg"
compressLevel 1~100 only works on jpg format

beep()

  • void
Play a beep sound

wifi(value)

  • void
value can be set to "true" or "false"

setClip(text)

  • void
text that you want to save to clipboard

getClip()

  • return {text}
get text value from the clipboard

isImageExit(imageId)

  • return {boolean}
check if image is exist in cache

copyImageToIndex(cache_imageId, new_imageId_index)

  • VOID
copy cache image to new index

removeImage(imageId)

  • void
the image that you want to remove from cache

留言

這個網誌中的熱門文章

Fasttick Game support list

app link: https://play.google.com/store/apps/details?id=com.fasttick Currently it works for games like Eden (it just work) vlogger Go Viral (it works) RushFight (it has some kind of date tracking, add one day after you take the daily bonus) Japanese clicker games1 Japanese clicker games2 AbyssRium (need to pause the game, in order to get it to work) Video will be included later on

123Autoit nonroot tutorial

Background Info: This App doesn't require Root Permission, it works by setting up Page with Checkpoints and Action with SC(screen captured images), if all checkpoints matched then it will trigger Action. So CheckPoint and Action, to create a complete Automation Flow, pages with checkpoints and Action in it. Assumption your device is start the Accessibility Service and your android version is 7.0 or above For General Question: check out here All Test is done using this app. or you can use any other app, it would work the same. https://play.google.com/store/apps/details?id=com.test.automate 1 tutorial: when see this title Red rectangle in this location Red circle click on it. Here is what to do: first click on this floating to bring out the sub menu then in the sub menu click on the "SC" which is Screen capture, it store the image to your local directory, and then it will take you to edit mode, please wait. now you are in the edit mod...