AI手机网,短视频直播 硬改改机 一键新机 群控软件 刷机定制

 找回密码
 立即注册
搜索
查看: 1654|回复: 1

侠客群控引擎二次开发SDK可用方法大全(持续更新)

[复制链接]
发表于 2018-3-29 13:11:22 | 显示全部楼层 |阅读模式
3 [$ S9 m) e0 R) \# y7 x! d
首先,SDK项目需要引用sdk的类库,位置在 安装目录\xcontrol.core.dll 如 C:\Program Files\南宁侠客网络科技有限公司\侠客手机群控引擎\xcontrol.core.dll- ^% n2 s2 s8 T* |2 z( w

) A! b5 h1 G! r# U" g可用方法如下:

- N  \; X4 D1 J3 v( {+ X0 a
  • public void ShowLogConsole([string title = 插件调试日志])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 显示日志控制台
    ) Z) r/ U6 v; H% e0 W1 a4 i

6 Q- c9 {  W$ \" P: `
  • public string Click(int x, int y)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 点击
  • 参数:
  • x: x坐标
  • y: y坐标
  • 返回结果:+ G( c) ]# u1 M5 A* B

/ j/ @* ]! d! k* T
  • public abstract string Name()
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 模块名称
  • 返回结果:
    # i. T8 f* W8 G+ R5 U' s; m

4 ^1 Y% ?9 X2 u7 g* o
  • public abstract string Description()
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 模块描述
  • 返回结果:
    : Y, {, _: W* [8 r" i$ C) x/ z

* \5 ?' t" s) M' V6 q+ [( {
  • public abstract void RunScript()
  • AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 模块执行过程
  • 返回结果:+ E: i# j5 y1 L0 ~

3 F) k; r; V' }( X* C/ U* g
  • public string Drag(int startx, int starty, int endx, int endy)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 拖动
  • 参数:
  • startx: 起始x坐标
  • starty: 起始y坐标
  • endx: 结束x坐标
  • endy: 结束y坐标
  • 返回结果:/ M0 R) _* j- `
  I! s% n: p6 J+ O
  • public string FindAndCLickAndClearObj(string text, [int index = 0])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 查找并点击并清空(精确匹配模式)
  • 参数:
  • text: 资源id或类名或特征字符
  • index: 索引,表示作用于匹配的第几个结果
  • 返回结果:
    4 h" V5 s" N' f' }, R' r+ ], U

: `5 _0 U& P( F9 M
  • public string FindAndCLickAndClearObjByRegex(string regex, [int index = 0])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 查找并点击并清空(正则模式)
  • 参数:
  • regex: 资源id或类名或特征字符(支持正则表达式)
  • index: 索引,表示作用于匹配的第几个结果
  • 返回结果:% v, g; e; d4 P3 {* g* ]* d$ |+ h

, n' j+ x! q9 D' Y
  • public string FindAndCLickObj(string text, [int index = 0])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 查找并点击元素(精确匹配模式)
  • 参数:
  • text: 资源id或类名或特征字符
  • index: 索引,表示作用于匹配的第几个结果
  • 返回结果:
      f8 ]8 j1 T3 y: j
" [4 G, d9 o! f% U3 ^! \
  • public string FindAndCLickObjByRegex(string regex, [int index = 0])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 查找并点击元素(基于正则表达式)
  • 参数:
  • regex: 资源id或类名或特征字符(支持正则表达式)
  • index: 索引,表示作用于匹配的第几个结果
  • 返回结果:1 K, n( v; ~+ X3 \5 `

( J) q# D% ?0 e
  • public string FindAndInutText(string name, string text, [int index = 0])
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 查找并赋值(一般用于文本框)
  • 参数:
  • name: 资源id或类名或特征字符(支持正则表达式)
  • text: 输入的文本
  • index: 索引,表示作用于匹配的第几个结果
  • 返回结果:
    5 Z1 ], n  Z4 u$ ?% k* K% [5 C( f

: i6 A# d6 i; ^
  • public string FindObj(string text)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 精确匹配查找元素
  • 参数:
  • text: 资源id或类名或特征字符
  • 返回结果:
    4 s. e1 }( e6 D9 w
7 J( Y+ {6 d; F) U$ H. i
  • public string FindObjByRegex(string regex)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 基于正则查找元素
  • 参数:
  • regex: 资源id或类名或特征字符(支持正则表达式)
  • 返回结果:& H  R; `$ [  w! x* @2 ?5 h8 O! i

6 c) ?. l4 h( i& |. W% K. Z/ R# [! ?, y  \2 u
  • public string GetLoction()
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 读取手机的GPS坐标
  • 返回结果:  R' X% @& @+ J8 v/ t! C7 z
7 M- k. J7 J% f8 A; H/ ~
  • public System.Collections.Generic.List<string> GetUiTexts(string regex)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 获取元素文本
  • 参数:
  • regex: 资源id或类名或特征字符(支持正则表达式)
  • 返回结果:0 H! `0 \7 d: ^2 D7 |6 }

7 `+ T/ j) R! E. M
  • public void InputText(string text)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 通过输入法输入文本
  • 参数:
  • text: 要输入的内容
    8 ?* \$ i) N4 y/ \; d& d9 l

; i& i" q( [6 g- ?3 g) g) a
  • public void OpenUserChat(string userid)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 打开用户对话界面
  • 参数:
  • userid: 微信id,可以是真实id也可以是加密id,或者群id、公众号id
    ; B' L! z8 w1 y
7 s' `0 P% T  X2 k1 k
  • public string PressKeyCode(int keycode)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 发送按键
  • 参数:
  • keycode: 按键代码(可参考安卓keyevent)
  • 返回结果:7 x/ j# u0 s+ O0 j7 S$ U9 ^

1 e: W2 x9 ]! C  D9 V
  • public string RunAdb(string adbcmd)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 在手机上执行执行ADB命令
  • 参数:
  • adbcmd: adb命令
  • 返回结果:
    6 R) v; g! B7 j3 @! C$ [' J2 g
4 v. z: P  h9 u: X2 G3 M
  • public string SendIntent(System.Collections.Generic.Dictionary<string, string> dic)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 发送Intnet
  • 参数:
  • dic: key value形式的intnet值
  • 返回结果:
    3 f( Q/ L  x& o9 `; j% {

. J0 ?& u. h; W! [7 ~% t
  • public void SetAirPlane(bool ison)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 设置飞行模式
  • 参数:
  • ison: 是否开启飞行模式! i' t  J- V" b+ H9 f7 `
5 h$ ]: j( p" U0 s" I; e
  • public void SetImei(string imei)
  •     AndroidControlSDK.AndroidScript 的成员! M1 a  E, f# a  A2 w; |7 {0 f

; X, |) T; D& \
  • public void SetLoction(string loction)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 设置手机的GPS坐标
  • 参数:
  • loction:$ E; f6 m5 R# ^$ h6 \! g+ N  W
  `0 Y- m  t, B9 K5 t: r6 b6 {
  • public void SetMacAddress(string macaddress)
  •     AndroidControlSDK.AndroidScript 的成员: H* L8 r5 g" Y+ Z' q1 q- p
8 o2 U6 G; ^' U: S6 Q
  • public void SetSid(string sid)
  •     AndroidControlSDK.AndroidScript 的成员
    ; [9 r1 k' l9 b% b
" g3 C8 {+ t4 C% M* m. |4 h; u+ W  v1 D
  • public void SetSim(string sim)
  •     AndroidControlSDK.AndroidScript 的成员
    . z6 x; S5 k) Q: |9 P' Q

1 \  P6 }9 v0 `+ ~
  • public void ShowStatus(string status)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 显示脚本状态
  • 参数:
  • status: 状态: h8 `% x6 q7 i" k8 i
$ T1 Q. D/ ^& I4 d' x" R7 d
  • public void ShowStatus(string status, System.Windows.Media.Color color)
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 显示脚本状态
  • 参数:
  • status: 状态
  • color: 文字颜色
    7 \% }# z8 J& T" A/ d

7 k  l7 J- I. B& E, S. K3 [
  • public void StartWeixin()
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 进入微信
    $ ?7 Y8 v" B7 Q. n0 N2 F/ R$ ~
' u- ^, b. C. \& o0 t0 H
  • public void YaoYiXia()
  •     AndroidControlSDK.AndroidScript 的成员
  • 摘要:
  • 摇一摇% J3 z' z% {& L1 u
关闭wifi可使用 RunAdb("su -c svc wifi disable");,同理,开启wifi可使用RunAdb("su -c svc wifi enable");,想要插件执行adb命令建议先把手机连接到电脑上,然后使用adb shell进入环境,再测试相应的adb命令,群控执行RunAdb就是在adb shell环境下执行的
2 K- S8 i0 g+ O
$ n" d& M, r* R% n/ g, L& T
发表于 2018-9-4 23:23:53 | 显示全部楼层
好东西,谢谢分享!!!!!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

技术交流售后群

QQ|小黑屋|手机版|站点找错-建议|AI手机网 |Sitemap



GMT+8, 2024-4-27 01:15 , Processed in 0.143238 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表