• 新浪微博:
  • 腾讯微博:
  • 微信 :
按键精灵电脑版
立即下载

软件版本:2014.05
软件大小:21.6M
更新时间:07-04

按键精灵安卓版
立即下载

软件版本:3.2.6
软件大小:62.5M
更新时间:09-27

按键精灵iOS版
立即下载

软件版本:1.3.1
软件大小:29.2M
更新时间:09-29

按键精灵Mac版
立即下载

软件版本:1.1.0
软件大小:12.3M
更新时间:12-29

快捷导航

登录 后使用快捷导航
没有帐号? 注册

登录 注册
发新话题 回复该主题

各位老师 新手有个问题请教 [复制链接]

1#
怎么用ShowMessage ""命令,在屏幕上显示刚刚点击过的坐标 用于一些特殊的管理

2#



Delay 500
Dim TmpDat(10) ,TmpRnd,TmpBol
Dim TmpArr(380)//生成的随机数大小范围在0~1000
For i = 30 To 90
Randomize
TmpRnd = Int(rnd() * 380)
If TmpArr(TmpRnd) Then
i = i - 1 : TmpBol = TRUE
Else
TmpArr(TmpRnd) = True
End If
If TmpBol Then TmpBol = False Else TmpDat(i) = TmpRnd : TracePrint TmpRnd
Next
TracePrint TmpRnd
Dim sy = TmpRnd,sx = TmpRnd
If sy <= 25 Then
    sy=sy+50
End If
If sy >= 800 Then
    sy=sy-100
End If
If sx <= 170 Then
    sx=sx+170
End If
If sx >= 380 Then
    sx=sx-100
End If
If sx = sy Then
    sy=sy+20
End If
TracePrint sx,sy

Rem 开始
Delay 800
Dim intX1,intY1
FindMultiColor 0,0,0,0,"597DA7","5|3|EBA960,17|2|5F5FF9,10|1|D1B28D",0,0.9,intX1,intY1
If intX1 > -1 And intY1 > -1 Then
    Delay 800
    Tap intX1-110,intY1-42+80
End If
Delay 500
TracePrint intX1-100
TracePrint intY1-42+80
Do
Dim xiaox1 , xiaoy1
xiaox1 = GetPixelColor(162,439, 0) //得到指定点的颜色
xiaoy1 = GetPixelColor(165,569, 0)
If xiaox1 = "2D74B6" and xiaoy1 = "267FBC" Then //判断颜色
Delay 500
Call 点击屏幕()
Else Exit Do
End If
Loop
Delay 100
Do
Dim xiaox2 , xiaoy2
xiaox2 = GetPixelColor(152,334, 0) //得到指定点的颜色
xiaoy2 = GetPixelColor(152,361, 0)

Delay 500
If xiaox2 = "E5F5FD" and xiaoy2 = "C2E1EC" Then //判断颜色
Delay 800
Call 点击屏幕()
Else Exit Do
End If
Loop
Delay 100
Do
Dim xiaox3 , xiaoy3
xiaox3 = GetPixelColor(152,467, 0) //得到指定点的颜色
xiaoy3 = GetPixelColor(152,508, 0)

Delay 500
If xiaox3 = "C2DEEA" and xiaoy3 = "E5F5FD" Then //判断颜色
Delay 800
Call 点击屏幕()
Else Exit Do
End If
Loop
Delay 100
Do
Dim xiaox4 , xiaoy4
xiaox4 = GetPixelColor(116,637, 0) //得到指定点的颜色
xiaoy4 = GetPixelColor(131,637, 0)

Delay 500
If xiaox4 = "9ABF31" and xiaoy4 = "A1C77C" Then //判断颜色
Delay 800
Tap 131,637
Else Exit Do
End If
Loop
Delay 100
Do
Dim xiaox5 , xiaoy5
xiaox5 = GetPixelColor(458,801, 0) //得到指定点的颜色
xiaoy5 = GetPixelColor(462,797, 0)

Delay 500
If xiaox5 = "6F71EA" and xiaoy5 = "878EEC" Then //判断颜色
Delay 800
Tap 185,662
Else Exit Do
End If

Loop
Delay 100
Do
Dim xiaox6 , xiaoy6
xiaox6 = GetPixelColor(121,660, 0) //得到指定点的颜色
xiaoy6 = GetPixelColor(120,613, 0)

Delay 500
If xiaox6 = "92BA3E" and xiaoy6 = "93BB3B" Then //判断颜色
Delay 1000
Tap 131,637
Else Exit Do
End If
Loop
Delay 100
Do
Dim intX12,intY12
FindPic 6,14,144,279,"Attachment:帮派申请.png","000000",0,0.9,intX12,intY12
If intX12 > -1 And intY12 > -1 Then
    TracePrint intX12
    TracePrint intY12
    Else Exit Do
End If
Delay 800
Tap intX12,intY12
Loop
Delay 100
Do
Dim xiaox7 , xiaoy7
xiaox7 = GetPixelColor(152,468, 0) //得到指定点的颜色
xiaoy7 = GetPixelColor(152,500, 0)
Delay 500
If xiaox7 = "C2DEEA" and xiaoy7 = "E5F5FD" Then //判断颜色
Delay 500
Call 点击屏幕()
Else Exit Do
End If
Loop
Delay 500
Goto 开始


Sub 点击屏幕()

Delay 500
Tap sx,sy

End Sub    


这个没有什么问题 ,运行完美,但是就是太耗时了 ,很多个判定的延迟叠加在一起。老师给个思路 优化下

3#

大神

发新话题 回复该主题