通过定义,获取点的颜色然后进行判断,即可通过判断继续自己需要的执行代码,新手分享,大佬勿笑!
下面是我昨晚弄的自动吃药回血代码!
Do
A = GetPixelColor(479, 751)
B = GetPixelColor(486, 750)
C = GetPixelColor(524, 750)
If A = "C6C6C6" Then
Delay 100
KeyPress "7", 1
Delay 100
KeyPress "8", 1
Delay 100
KeyPress "9", 1
Delay 100
ElseIf B ="DEDEDE" Then
Delay 100
KeyPress "7", 1
Delay 100
KeyPress "8", 1
Delay 100
ElseIf C ="DEDEDE" Then
Delay 100
KeyPress "7", 1
Delay 100
End If
Delay 100
loop
复制代码
下面是我昨晚弄的自动吃药回血代码!
Do
A = GetPixelColor(479, 751)
B = GetPixelColor(486, 750)
C = GetPixelColor(524, 750)
If A = "C6C6C6" Then
Delay 100
KeyPress "7", 1
Delay 100
KeyPress "8", 1
Delay 100
KeyPress "9", 1
Delay 100
ElseIf B ="DEDEDE" Then
Delay 100
KeyPress "7", 1
Delay 100
KeyPress "8", 1
Delay 100
ElseIf C ="DEDEDE" Then
Delay 100
KeyPress "7", 1
Delay 100
End If
Delay 100
loop
复制代码