1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*!
# zxtouch
[](https://crates.io/crates/zxtouch)
ios 按键自动化(连点器)、需越狱并已经安装 [zxtouch.deb](https://github.com/dounine/zxtouch/raw/main/deb/com.zjx.ioscontrol_0.0.7-10_iphoneos-arm.deb)
[](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=dLoye8pBcO60zGzqLjGO0l-GgMIaf6wQ&authKey=LfxBdZ5A%2F9eWJbKpzTcuWPjmQu5UdIJ3TVTpqRAQYkCID50WLkYoIXcGxGKzupG3&noverify=0&group_code=799168925)
## 功能
1. [显示弹窗](#显示弹窗)
2. [点击屏幕](#点击屏幕)
3. [长按屏幕](#长按屏幕)
4. [滑动屏幕](#滑动屏幕)
5. [文本输入](#文本输入)
6. [打开应用](#打开应用)
7. [睡眠](#睡眠)
8. [图像匹配](#图像匹配)
9. [显示键盘](#显示键盘)
10. [隐藏键盘](#隐藏键盘)
11. [运行命令](#运行命令)
12. [获取设备信息](#获取设备信息)
13. [设置光标位置](#设置光标位置)
14. [获取屏幕大小](#获取屏幕大小)
15. [获取屏幕方向](#获取屏幕方向)
16. [获取屏幕缩放比例](#获取屏幕缩放比例)
## 显示弹窗
```rust
use zxtouch::zx_touch::{ZxTouch};
let mut touch = ZxTouch::new("192.168.3.113", 6000);//!
touch.connect().await.unwrap();
touch.show_alert_box("hello", "hi", 3).await.unwrap();
touch.close().await.unwrap();
```
## 点击屏幕
```rust
use zxtouch::zx_touch::{TouchFinger, ZxTouch};
let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch.touch(200, 200).await.unwrap();
touch.close().await.unwrap();
```
## 长按屏幕
```rust
use zxtouch::zx_touch::{TouchFinger, ZxTouch};
let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch.touch_long(200, 200,500).await.unwrap();
touch.close().await.unwrap();
```
## 滑动屏幕
```rust
use zxtouch::zx_touch::{TouchFinger, ZxTouch};
let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch.swipe(200, 200, 200, 500, 100).await.unwrap();
touch.close().await.unwrap();
```
## 文本输入
```rust
use zxtouch::zx_touch::ZxTouch;
let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch.text("hello").await.unwrap();
touch.close().await.unwrap();
```
## 打开应用
```rust
use zxtouch::zx_touch::ZxTouch;let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch
.open_app("com.netskao.dumpdecrypter")
.await
.unwrap();
touch.close().await.unwrap();
```
## 睡眠
```rust
use zxtouch::zx_touch::ZxTouch;let mut touch = ZxTouch::new("192.168.3.113", 6000);
touch.connect().await.unwrap();
touch.show_alert_box("hello", "hi", 1000).await.unwrap();
touch.sleep(10 * 1000).await.unwrap(); //10秒
touch.show_alert_box("hello", "hi", 1000).await.unwrap();
touch.close().await.unwrap();
```
*/
pub