分享个人操作阿里巴巴国际站多年的按键精灵脚本,直到现在都在使用。
本脚适合有按键精灵基础或学习者使用。
脚本没有写适配分辨率,使用者需要修改分辨率,并重新抓图。
脚本目的:
自动机译多语言产品,自动编辑提交,完成手动效果。
脚本运行调试打开管理机器翻译产品 – xxx语页面:
推荐使用360安全浏览器,自动清理缓存,不影响速度。
Rem 开始
While 1
FindPic 0,0,1600,900,"Attachment:\未编辑.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 1000
KeyPress "Up", 20
Delay 800
KeyPress "Down", 7
Delay 1000
Goto 编辑
Else
Goto 翻页
End If
Wend
Rem 编辑
For 10
While 1
FindPic 0,0,1600,900,"Attachment:\多编辑.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx+5, inty+5
LeftClick 1
Goto 开始机译
Else
Goto 翻页
End If
Wend
Rem 翻页
Delay 800
While 1
FindPic 0,0,1600,900,"Attachment:\下一页.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx, inty
Delay 500
LeftClick 1
Delay 3000
Goto 开始
Else
KeyPress "Down", 5
Delay 800
End If
Wend
Rem 开始机译
While 1
FindPic 0,0,1600,900,"Attachment:\加载完成.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx, inty
LeftClick 1
Goto 提交
Else
Delay 500
End If
Wend
Rem 提交
KeyPress "Down", 50
Delay 1000
FindPic 0,0,1600,900,"Attachment:\多提交.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx+20, inty+38
LeftClick 1
End If
Rem 多提交完成
While 1
FindPic 0,0,1600,900,"Attachment:\多提交完成.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 800
Goto 提交完成
Else
Delay 500
Goto 翻译失败
End If
Wend
Rem 翻译失败
While 1
FindPic 0,0,1600,900,"Attachment:\标题超长.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
KeyDown 17, 1
KeyPress 87, 1
KeyUp 17, 1
KeyPress "Enter", 1
Goto 结束
Else
Delay 500
Goto 多提交完成
End If
Wend
Rem 提交完成
Delay 500
KeyDown 17, 1
KeyPress 87, 1
KeyUp 17, 1
Rem 结束
Delay 1000
Next
脚本识图:

脚本比较完善,翻译失败会自动关闭翻译下一条。
调试可根据自己网络速度和分辨率调整翻页延迟时间。
脚本仅供参考学习,阿里后台变动需要修改识图部分。