按键精灵 用ifcolor写两点颜色对比,然后判定
A=GetPixelColor(1126,220);IfColor1126,220,"A"0ThenDelay100MoveTo1043,200Delay1000Left...
A = GetPixelColor(1126, 220);
IfColor 1126, 220,"A"0 Then
Delay 100
MoveTo 1043, 200
Delay 1000
LeftDown 1
Delay 100
MoveTo 1069, 668
Delay 1000
LeftUp 1
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
Else
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
End If
哪里错了吗,是不是变量啊。回答告诉我巴黎错了,还有附上正确的句子 展开
IfColor 1126, 220,"A"0 Then
Delay 100
MoveTo 1043, 200
Delay 1000
LeftDown 1
Delay 100
MoveTo 1069, 668
Delay 1000
LeftUp 1
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
Else
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
End If
哪里错了吗,是不是变量啊。回答告诉我巴黎错了,还有附上正确的句子 展开
展开全部
1如果要不停比较,你要加循环,不然只判断一遍就结束了2.如果你是在运行设置里面加循环的话,比对时永远是不断重新取色,所以颜色永远比不出来。3.如果只是比较一次,那么取色与判断颜色之间应该加上延时,不然一取到色就立刻判断,达不到预期效果。
A = GetPixelColor(1126, 220);
do
IfColor 1126, 220,A,0 Then
Delay 100
MoveTo 1043, 200
Delay 1000
LeftDown 1
Delay 100
MoveTo 1069, 668
Delay 1000
LeftUp 1
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
Else
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
End If
loop
A = GetPixelColor(1126, 220);
do
IfColor 1126, 220,A,0 Then
Delay 100
MoveTo 1043, 200
Delay 1000
LeftDown 1
Delay 100
MoveTo 1069, 668
Delay 1000
LeftUp 1
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
Else
Delay 100
MoveTo 1043, 200
Delay 1000
LeftClick 1
Delay 100
MouseWheel -1
Delay 100
End If
loop
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询