//********* 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 **************//