跳到主要內容

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

這個網誌中的熱門文章

123autoit non-root (後台服務) daemon service

for 123Autoit non-ROOT (android 7.0)+
  Pretouch semi auto (Android 7.0)+
non Computer non Daemon Service is avaiable LINK





For Other Version of android this service works for
   123autoit non-root (android 5.0+)
   123autoit non-root legacy (android 4.2~4.4)
   PreTouch -Semi Auto
    123GridTouch
Autoit Native Service


**************************
1.Mobile with ARM processor>>>>DOWNLOAD 1.5.3.1a GOOGLE DRIVE<<<<>>>>DOWNLOAD 1.5.3a DROP BOX<<<<< Download this to PC, and unzip file, and run the run2.bat, after that your device should show authentication, you need to accept, it should work without problemrun2.bat will show you directly if you have successfully started the daemon service.2.Mobile with Intel processor>>>>Download 1.5.3.1aX86 GOOGLE DRIVE<<<<>>>> Download 1.5.3.1aX86 DROP BOX<<<<<Check your Mobile Spec, for the Android CPU: if it is Intel® Atom, then Choose the X86 Daemon servi…

Alternative Daemon Service

For Android Device 7.0+
-Pretouch Semi auto >>https://play.google.com/store/apps/details?id=com.autoit.pretouch















-123Autoit NON ROOT >>https://play.google.com/store/apps/details?id=com.autoit.nonroot















now enable to work without Daemon Service without computer

updated: faster and lighter 
 Newer version: added UI interaction GOOGLE DRIVE>>>> NO PC daemon Service Downlad Android 7.0+ only GOOGLE DRIVE DROP BOX>>>> NO PC Daemon Service Download Android 7.0+ only DROPBOXOLDER version:  GOOGLE DRIVE >>>>>NO PC Daemon Service Download Android 7.0+ only GOOGLE DRIVE  DROP BOX>>>>NO PC Daemon Service Download Android 7.0+ only DROPBOX 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







cl…

Revamp Basic tutorial