Skip to content

Instantly share code, notes, and snippets.

@liuqinh2s
Created May 21, 2018 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuqinh2s/a8391be45fbaf5ffea8c89a6e3cf7d8b to your computer and use it in GitHub Desktop.
Save liuqinh2s/a8391be45fbaf5ffea8c89a6e3cf7d8b to your computer and use it in GitHub Desktop.
// 从TXT文件中读取店铺名到数组
Dim shopNameFilePath="/sdcard/shopName.txt", shopNameArray
shopNameArray = File.ReadLines(shopNameFilePath)
// 截图保存路径
Dim snapShotPath = "/sdcard/shopPhoneDir/"
// 循环输入店铺名
For Each element In shopNameArray
Dim color
// 点击输入框
Tap 341, 98
Delay 1000
// 先删除输入框中原有的内容
Touch 662, 1118, 3000
// 然后输入店铺名
InputText element
Tap 658, 90
Delay 1000
// 检测网络是否加载好了店铺
color = CmpColor(608, 388, "0055ff", 1.0)
// 如果没加载好,循环等待
While color <> 0
Delay 1000
color = CmpColor(608, 388, "0055ff", 1.0)
Wend
// 点击店铺头像进入店铺
Tap 82, 393
Delay 2000
Tap 57, 251
Delay 2000
SnapShot snapShotPath & element & ".jpg", 156, 860, 354, 911
// 点击返回
KeyPress "Back"
Delay 1000
KeyPress "Back"
Delay 1000
KeyPress "Back"
Delay 1000
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment