|
2 r9 y5 y+ B b首先,SDK项目需要引用sdk的类库,位置在 安装目录\xcontrol.core.dll 如 C:\Program Files\南宁侠客网络科技有限公司\侠客手机群控引擎\xcontrol.core.dll- y0 h" p) a2 ~" }% `6 p
7 R( D0 H6 N9 L: p5 ?1 V. V, i! A可用方法如下:6 S1 X, l; H5 C1 _0 V) V
- public void ShowLogConsole([string title = 插件调试日志])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 显示日志控制台
7 e, R2 Z5 b5 d' ` 0 Z' q) Z# h+ Q, z3 j; l" Y
- public string Click(int x, int y)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 点击
- 参数:
- x: x坐标
- y: y坐标
- 返回结果:
9 }7 o1 X+ i; o" A& c; K $ O2 q7 e" C8 {% m% P6 y
- public abstract string Name()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 模块名称
- 返回结果:7 b$ [' A I' B6 [& Z1 f( K- z
) K5 _) Z6 _0 D2 C! C" _- public abstract string Description()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 模块描述
- 返回结果:
8 Z: j' Z L# \
3 j2 a6 Y9 R0 z* _, \- public abstract void RunScript()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 模块执行过程
- 返回结果:2 y7 U q" G* c& l7 s" R
: v; ^7 e% q! I- public string Drag(int startx, int starty, int endx, int endy)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 拖动
- 参数:
- startx: 起始x坐标
- starty: 起始y坐标
- endx: 结束x坐标
- endy: 结束y坐标
- 返回结果:
G6 O% f" Y8 W# a" L * B" k' K- A% ^3 l
- public string FindAndCLickAndClearObj(string text, [int index = 0])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 查找并点击并清空(精确匹配模式)
- 参数:
- text: 资源id或类名或特征字符
- index: 索引,表示作用于匹配的第几个结果
- 返回结果:
0 n; }( K. r: w) F1 u1 c. y5 f z
* [* }! ?. G: L( ?- public string FindAndCLickAndClearObjByRegex(string regex, [int index = 0])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 查找并点击并清空(正则模式)
- 参数:
- regex: 资源id或类名或特征字符(支持正则表达式)
- index: 索引,表示作用于匹配的第几个结果
- 返回结果:# ?, N9 G2 S; Z1 b' [0 _ ]1 O* o" m
4 o. ]" Q5 R# S# P& l7 l* z- public string FindAndCLickObj(string text, [int index = 0])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 查找并点击元素(精确匹配模式)
- 参数:
- text: 资源id或类名或特征字符
- index: 索引,表示作用于匹配的第几个结果
- 返回结果:/ h3 |! C; \ q6 \+ h7 A* z8 Q l% l
" K+ q. g( v& c+ h. c$ f
- public string FindAndCLickObjByRegex(string regex, [int index = 0])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 查找并点击元素(基于正则表达式)
- 参数:
- regex: 资源id或类名或特征字符(支持正则表达式)
- index: 索引,表示作用于匹配的第几个结果
- 返回结果:: w r) s3 V) s `0 ]
0 S. z8 m6 y, X6 F7 a/ W) k. G" I- public string FindAndInutText(string name, string text, [int index = 0])
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 查找并赋值(一般用于文本框)
- 参数:
- name: 资源id或类名或特征字符(支持正则表达式)
- text: 输入的文本
- index: 索引,表示作用于匹配的第几个结果
- 返回结果:
2 C& g$ V5 ?5 A7 G& e, a1 c, ~
7 _& }. D! M9 C* E( v. q- public string FindObj(string text)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 精确匹配查找元素
- 参数:
- text: 资源id或类名或特征字符
- 返回结果:+ l I2 {, b& f( V
2 B, x6 s) K1 k( a$ Y; e: T% z
- public string FindObjByRegex(string regex)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 基于正则查找元素
- 参数:
- regex: 资源id或类名或特征字符(支持正则表达式)
- 返回结果:
, Z5 [/ Y `3 s; K9 @ 3 @# r4 S$ ^4 I! z
- public string GetLoction()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 读取手机的GPS坐标
- 返回结果:2 b: Y7 C+ N6 l* ]: W# y* f
1 H/ L: ~' p% t. N- public System.Collections.Generic.List<string> GetUiTexts(string regex)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 获取元素文本
- 参数:
- regex: 资源id或类名或特征字符(支持正则表达式)
- 返回结果:
6 K& F! f' [/ ]6 | ^3 b
3 i5 I0 K: F) z2 Y- public void InputText(string text)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 通过输入法输入文本
- 参数:
- text: 要输入的内容; |% l& a! ]' p, l
5 E) ~, B' M7 b l% L3 B/ Y
- public void OpenUserChat(string userid)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 打开用户对话界面
- 参数:
- userid: 微信id,可以是真实id也可以是加密id,或者群id、公众号id" V7 B# `( _; B6 b: [0 c/ u
! b% g! S6 P! |6 a
- public string PressKeyCode(int keycode)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 发送按键
- 参数:
- keycode: 按键代码(可参考安卓keyevent)
- 返回结果:" W8 X0 `: |) ^$ {
: C, ?5 Y7 c0 e: l" O, ^. k5 e, ?- public string RunAdb(string adbcmd)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 在手机上执行执行ADB命令
- 参数:
- adbcmd: adb命令
- 返回结果:
* s" U2 n% ?4 b' Y# F: h7 ]" { & K7 Z F1 S3 S S: z' X
- public string SendIntent(System.Collections.Generic.Dictionary<string, string> dic)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 发送Intnet
- 参数:
- dic: key value形式的intnet值
- 返回结果:
& V! V# x& }" I7 v6 V
F9 m. W+ `; P+ e4 {- public void SetAirPlane(bool ison)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 设置飞行模式
- 参数:
- ison: 是否开启飞行模式
2 d9 F' z! D# L/ r
2 S$ K% Q# }' V! i4 a- public void SetImei(string imei)
- AndroidControlSDK.AndroidScript 的成员
- [0 t ]9 @/ O( Q1 o! G3 ?( e Z 1 W: o1 e n: T, S
- public void SetLoction(string loction)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 设置手机的GPS坐标
- 参数:
- loction:
5 y3 t/ @# t9 i 4 z- Z. |; @) g& H. a% i! Z
- public void SetMacAddress(string macaddress)
- AndroidControlSDK.AndroidScript 的成员$ X1 W v7 } U+ _& }
. [/ p5 v* _) T: V6 \- public void SetSid(string sid)
- AndroidControlSDK.AndroidScript 的成员7 D8 L/ v. N) J- [
0 |, a& d I& k& S0 H, ?. s- public void SetSim(string sim)
- AndroidControlSDK.AndroidScript 的成员, i" f, I7 Y- ^, z% m. c
. Q2 e8 W! P$ I# K/ L' {4 J. g# @; U- public void ShowStatus(string status)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 显示脚本状态
- 参数:
- status: 状态, q, J5 P8 r# [( F% d; p* }
# ?; z5 r7 O3 p- |- A
- public void ShowStatus(string status, System.Windows.Media.Color color)
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 显示脚本状态
- 参数:
- status: 状态
- color: 文字颜色7 k) e" L" T, H0 e5 ?. y- h X
C. f. C% n) u, _
- public void StartWeixin()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 进入微信
$ y F# w, b) `3 q0 T& G. b ) b7 s, C* x& o! {7 S0 I$ Q; x4 ~
- public void YaoYiXia()
- AndroidControlSDK.AndroidScript 的成员
- 摘要:
- 摇一摇
8 Z5 [/ X. g% d$ {, B) D1 m; ]
5 f% n( C' |- K" r( Z |
|