按键精灵抢课


//********* test coordinate *****//
Do While 0

Delay 3000
GetCursorPos x, y
MessageBox x
MessageBox y

Loop
//********* end of test ********//

 

//******need user input*********/
xCourseBox = 69
yCourseBox = 340
yVerifyBox = 382
ySubmitBox = 441
const numCourse = 3
Dim nameCourse(3)
nameCourse(0) = "PTSS110057.10"
nameCourse(1) = "PTSS110067.04"
nameCourse(2) = "PTSS110067.08"
//******end of user input*********/


//********* main **************//
xSubmitBox = xCourseBox
xVerifyBox = xCourseBox

idxCourse = 0
Do While 1 
 //1. input course
 MoveTo xCourseBox, yCourseBox
 LeftClick 1
 KeyDown 17, 1
 KeyPress 65, 1
 KeyUp 17, 1
 SayString nameCourse(idxCourse)
  
 //2. monitor user input, put to verify box
 MoveTo xVerifyBox, yVerifyBox
 LeftClick 1
 KeyDown 17, 1
 KeyPress 65, 1
 KeyUp 17, 1
 For idx = 1 To 4
  keyIn = WaitKey()
  If keyIn = 113 Then //F2 to alter course index
      idx = idx - 1
      idxCourse = (idxCourse + 1) Mod numCourse
  ElseIf keyIn = 27   //ESE to exit
            EndScript
  End If
 Next
  
 //3. sumbit
 MoveTo xSubmitBox, ySubmitBox
 LeftClick 1
 Delay 300
 KeyPress "Enter", 1
    Delay 300
Loop
//********* end of main **************//

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值