用按键精灵,写个简单的跳课脚本

您所在的位置:网站首页 可以刷课的网址大全 用按键精灵,写个简单的跳课脚本

用按键精灵,写个简单的跳课脚本

2024-07-16 06:42| 来源: 网络整理| 查看: 265

1 首先下个按键精灵,随便百度就能下载

2 按键精灵的脚本语言很简单,也有中文编码,只要熟悉点编程知识就行,记住常用的抓取坐标,元素点就行,使用判断 循环,语句就可以各种操作了。 3 下载默认安装就行了,打开界面如下

 

4 点击我的脚本新建脚本

5 新建脚本,写脚本,中文用左边基本命令就行了

 

6. 我自己写的代码,灵活些

7 以超新选修网课为例子

 

 

 

 

8   第一步  代码  ,开始一直获取暂停键的位置,根据元素变化,判断是否暂停,暂停就单击

Delay 500 Color1 = GetPixelColor(475,510) Color2 = GetPixelColor(479, 520) Color3 = GetPixelColor(950, 650) TracePrint Color1 TracePrint Color2

If ((Color1 = "373834") and (Color2 = "373834"))  Then  MoveTo 420, 405  Delay 500 LeftClick 1 MoveTo 788, 516 If (Color4 = "2AB5F2") Then  MoveTo 529, 831     Delay 1000     LeftClick 1     Else       FindPic 1611,98,1910,862,"Attachment:\bb.bmp",0.9,intX,intY If intX > 0 Then      MoveTo intX + 27, intY + 27 Delay 4000 LeftClick 1 MoveTo 529, 831     Delay 1000     LeftClick 1 End If     End If

9. 第二步 进入循序,一直获取指定左边,元素,看是否出现,判断题,出现先点击A选项,获取失败元素点,有再点B选项,没有跳出循环

do  Color4 = GetPixelColor(536, 413) If (Color4 = "B1E6FF") Then   FindPic 450, 338, 1164, 934, "Attachment:\B1.bmp", 0.9, intX, intY   FindPic 450, 338, 1164, 934, "Attachment:\B11.bmp", 0.9, intX2, intY2 If intX > 0 and intY > 0 Then  MoveTo intX, intY Else MoveTo intX2, intY2 End If

    LeftClick 1  Delay 2000   Moveto 531, 521 LeftClick 1 Delay 2000 Color5 = GetPixelColor(536, 413) If (Color5 = "B1E6FF") Then  FindPic 450, 338, 1164, 934, "Attachment:\B2.bmp", 0.9, intX, intY FindPic 450, 338, 1164, 934, "Attachment:\B21.bmp", 0.9, intX1, intY1 If intX > 0 and intY > 0 Then  MoveTo intX, intY Else  MoveTo intX1, intY1 End If    LeftClick 1    Delay 1000 LeftClick 1 Delay 1000  MoveTo 531, 521   Delay 1000 LeftClick 1  Delay 1000 LeftClick 1 End If Exit Do End If Delay 2000 Loop

10   第三步  获取完成的右边区域的,绿色元素点坐标,相对位移坐标,到下一个科目,进入开始第一步循环。

Do Color4 = GetPixelColor(481, 365) If (Color4 = "349A7B") Then   FindPic 1611,98,1910,862,"Attachment:\bb.bmp",0.9,intX,intY If intX > 0 Then  MoveTo intX + 27, intY + 27 Delay 4000 LeftClick 1 Delay 4000 End If Exit Do End If Loop Delay 2000 11 综上,的思路是这样的,大家可以看看我的实现过程。自己也可以试试写写!完全用我的代码没用,的每个人电脑分辨率,和缩放不同,坐标,和元素点不一样的,要靠自己调试!  

 

 

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3