永发信息网

按键精灵点色彩捕捉识别!!

答案:1  悬赏:0  手机版
解决时间 2021-04-16 15:31
  • 提问者网友:孤山下
  • 2021-04-15 15:37
IfColor 375,100,"0",2 Then

'==========以下是按键精灵录制的内容==========
MoveTo 627, 82
Delay 217
MoveTo 632, 82
Delay 8
MoveTo 637, 83
Delay 8
MoveTo 643, 84
Delay 8
MoveTo 651, 84
Delay 8
MoveTo 661, 84
Delay 8
MoveTo 669, 84
Delay 8
MoveTo 677, 84
Delay 8
MoveTo 684, 84
Delay 8
MoveTo 691, 84
Delay 8
MoveTo 697, 84
Delay 8
MoveTo 702, 84
Delay 8
MoveTo 708, 84
Delay 9
MoveTo 712, 84
Delay 7
MoveTo 716, 84
Delay 8
MoveTo 720, 84
Delay 8
MoveTo 724, 84
Delay 8
MoveTo 727, 84
Delay 8
MoveTo 730, 84
Delay 8
MoveTo 731, 84
Delay 8
MoveTo 733, 84
Delay 8
MoveTo 734, 84
Delay 8
MoveTo 735, 84
Delay 152
MoveTo 735, 86
Delay 8
MoveTo 732, 86
Delay 8
MoveTo 728, 87
Delay 8
MoveTo 723, 88
Delay 8
MoveTo 720, 90
Delay 8
MoveTo 714, 90
Delay 9
MoveTo 711, 90
Delay 7
MoveTo 709, 90
Delay 8
MoveTo 707, 90
Delay 8
MoveTo 706, 90
'==========以上是按键精灵录制的内容==========
Else
'==========以下是按键精灵录制的内容==========
MoveTo 914, 742
Delay 8
MoveTo 913, 743
Delay 8
MoveTo 911, 745
Delay 7
MoveTo 907, 746
Delay 9
MoveTo 903, 749
Delay 8
MoveTo 897, 750
Delay 8
MoveTo 889, 754
Delay 8
MoveTo 876, 759
Delay 7
MoveTo 868, 761
Delay 9
MoveTo 854, 765
Delay 8
MoveTo 842, 766
Delay 8
MoveTo 831, 767
Delay 8
MoveTo 820, 768
Delay 8
MoveTo 810, 770
Delay 8
MoveTo 803, 770
Delay 7
MoveTo 799, 770
Delay 9
MoveTo 794, 770
Delay 9
MoveTo 791, 770
Delay 6
MoveTo 788, 769
Delay 8
MoveTo 785, 767
Delay 8
MoveTo 782, 765
Delay 9
MoveTo 780, 763
Delay 7
MoveTo 778, 761
Delay 8
MoveTo 778, 759
Delay 16
MoveTo 778, 756
Delay 8
MoveTo 778, 753
Delay 8
MoveTo 778, 751
Delay 8
MoveTo 778, 748
Delay 9
MoveTo 779, 745
Delay 7
MoveTo 785, 741
Delay 8
MoveTo 790, 738
Delay 8
MoveTo 799, 736
Delay 7
MoveTo 806, 733
Delay 8
MoveTo 817, 731
Delay 8
MoveTo 827, 728
Delay 8
MoveTo 838, 728
Delay 8
MoveTo 849, 728
Delay 8
MoveTo 859, 728
Delay 8
MoveTo 872, 728
Delay 8
MoveTo 881, 730
Delay 8
MoveTo 891, 733
Delay 8
MoveTo 899, 735
Delay 8
MoveTo 905, 739
Delay 8
MoveTo 908, 741
Delay 8
MoveTo 909, 742
Delay 8
MoveTo 909, 744
Delay 8
MoveTo 909, 747
Delay 8
MoveTo 909, 749
Delay 16
MoveTo 909, 751
Delay 8
MoveTo 907, 754
Delay 9
MoveTo 906, 755
Delay 7
MoveTo 901, 757
Delay 9
MoveTo 899, 758
Delay 7
MoveTo 896, 758
Delay 8
MoveTo 894, 759
Delay 8
MoveTo 891, 759
Delay 9
MoveTo 888, 759
Delay 7
MoveTo 885, 760
Delay 19
MoveTo 879, 760
Delay 5
MoveTo 876, 760
Delay 8
MoveTo 875, 760
Delay 8
MoveTo 873, 760
Delay 9
MoveTo 872, 760
Delay 15
MoveTo 870, 760
'==========以上是按键精灵录制的内容==========

End If

这个是我在桌面下编辑的一个色彩捕捉识别脚本,选取的色彩点就是我的桌面背景,
为什么,我IF运行脚本,电脑自动判断总是else?
是不是程序和屏幕的色位不一致,怎么调?
最佳答案
  • 五星知识达人网友:轮獄道
  • 2021-04-15 16:29
1、你确定375,100要的色彩是0?就是黑色?就用抓抓工具看看目标点有色彩是什么?
2、你是用约等于,这样比效慢,最好建议用等于。

IfColor 375,100,"0",2 Then 这句本来没什么问题。
意思是 如果375,100的色彩约等于黑色(就是0)那么执行。。。。
我估计你的色彩采错了~用抓抓工具把鼠标移动目标点,之后按Ctrl+Alt+1,就可以把这点的色彩值存入1号位了,之后再调用。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯