跳到主要內容

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

留言

這個網誌中的熱門文章

Alternative Daemon Service

Accessibility Service Download Google Play : >> https://play.google.com/store/apps/details?id=com.autoit.nonroot.accessibility Video Instruction For Android Device 7.0+  - 123Autoit NON ROOT >> https://play.google.com/store/apps/details?id=com.autoit.nonroot - Pretouch Semi auto >> https://play.google.com/store/apps/details?id=com.autoit.pretouch now enable to work without Daemon Service without computer updated: faster and lighter   Newer version: added UI interaction     for 123Autoit nonROOT click to open click open accessibility turn on the 123Autoit Accessibility click on three dots click on three strips check the check box Alternative Service Android 7.0+ and download the apk and install For Pretouch Semi Auto  Open pretouch semi auto click on the blue circle click on Edit

privacy policy

Privacy Policy for Sound per app At Sound per app, accessible from , one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by Sound per app and how we use it. If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us. Privacy Policies You may consult this list to find the Privacy Policy for each of the advertising partners of Sound per app. We do not collect any data by using this app. Only data will be used is coming from enabling the Accessibility service which reveal the foreground application package name, which these data will only be used within the application itself. Third Party Privacy Policies Sound per app's Privacy Policy does not have any advertisments. Thus, no concern should not be consider in this area. Children's Information Another part of our priority is adding protection for children wh

Bug report

20170126 +Reported an add and delete page , image issue in 123autoit non root will get into fixing the problem when I get back from vacation 20160622 + we have found out that a small bug in Locale setting, it only affect user with Chinese locale, and has not set the language in the setting page< fixed at (version 1.5.20) 20160621 +we have been found out that not all device has the path /storage/sdcard0/ which is our default storage location, you might want to change according to your device. we have implemented validation on storage location, check if they exist, you can also change the location at setting #2 < added at (version 1.5.19 )20160621 Sorry for the inconvenience 20160620 +user has reported, sometimes Recharge button can't play back Video Ads, i have implemented a caches on the video ads, see if the problem has been resolved< added at  (version 1.5.18) 20160616 +user reported repeat text field and search page number field can't set number via