python 按键精灵脚本_按键精灵的脚本 - 对于重复动作(含键盘鼠标)太好用了

'搜索的视图大小。

STD_LEFT = 20

STD_TOP = 100

STD_RIGHT = 620

STD_BOTTOM = 1000

Function DoClick

LeftDown 1

Delay 20

LeftClick 1

Delay 20

LeftUp 1

Delay 1

LeftUp 1

Delay 1

End Function

Function CloseAGWindow

MoveTo 616, 8

Delay 500

LeftClick 1

LeftUp 1

End Function

Function LoadAGFromIM

CloseAGWindow

'==========以下是按键精灵录制的内容========== 需要把 99U 放置在屏幕右下角, 非自动隐藏状态。

iconRetry = 3

While (iconRetry > 0)

img = "C:\Users\ray\Desktop\AG_BMP\AppIco.bmp"

FindPic 1000, 990, 1200, 1020, img, 0.9, BmpPos(0), BmpPos(1)

If (BmpPos(0) >= 0) Then

iconRetry = 0

Else

Delay 1000

iconRetry = iconRetry -1

End If

Wend

If (BmpPos(0) <= 0) Then

BmpPos (0) = 1055

BmpPos(1) = 1008

End If

If (BmpPos(0) >= 0) Then

MoveTo BmpPos(0), BmpPos(1)

Delay 100

LeftDoubleClick 1

Delay 78

MoveTo 1017, 564

LeftClick 1

End If

MoveTo 1017, 564

LeftClick 1

'==========以上是按键精灵录制的内容==========

End Function

Function btnBackClick        '返回按钮。

MoveTo 89,116

DoClick

End Function

Function ReloadApp            ' 浏览器刷新菜单

MoveTo 79,62

DoClick

End Function

'全局, 根据图像列表, 找到第一个匹配的对象, 并返回坐标点。

Dim BmpList(100)

Dim BmpIdx        '当前正在查找图像的位置 0 坐标开始

Dim BmpPos(2) '第一个找到的坐标位置。 X, Y

Function FindBmp(bmpPath)

img = "C:\Users\ray\Desktop\AG_BMP\"' & bmpPath & "bmp"

img = img & bmpPath

img = img & ".bmp"

isFileExist = Plugin.File.IsFileExist(img)

If isFileExist = True Then

FindPic STD_LEFT, STD_TOP, STD_RIGHT, STD_BOTTOM, img, 0.9, BmpPos(0), BmpPos(

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值