AScript
Python 自动化开发平台
使用 Python 为 iOS 设备构建自动化程序。内置图色识别、OCR 文字识别、控件检索与操作等丰富 API,配合在线编辑器与可视化调试工具,让自动化开发简单高效。
开始构建
开发者文档
工具集
__init__.py
from
ascript.ios
import
screen
from
ascript.ios.wdapy
import
Selector
# OCR 文字识别 — 找到并点击
screen
.
Ocr
.
click
(
"登录"
)
# 图片模板匹配
pos
=
screen
.
FindImages
.
find
(
"btn.png"
)
# 控件查找 — 通过文本定位并点击
Selector
().
text
(
"确认"
).
click
()
print
(
"done"
,
pos
)
output
done (523, 847)