dorajychen
Technical User
Hi, I am a brand new Aspect script user. I am trying to use the recorder to input data from a text file. "Key Return to continue" prompt will come up for some accounts after entering the account number, I don't know how to pass it. Please help. My script looks like the following:
proc main
string sACCOUNT
string sCCODE
string sLinehld
if fopen 0 "C:\Work\Date.txt" READ
while not feof 0
fgets 0 sLinehld
substr sACCOUNT sLinehld 0 5
substr sCCODE sLinehld 6 9
transmit "8.1.01^M"
waitfor "^[[4m"
transmit sACCOUNT
transmit "^M"
waitfor "^[[4m"
;here is the problem encountered
;if waitfor "^[[0mKey RETURN to continue. ^[[0m" ;need to transmit "^M' once and then transmit "1^M"
;else
;transmit "1^M"
;endif
waitfor "^[[4m"
transmit "9000^M"
endwhile
endif
endproc
proc main
string sACCOUNT
string sCCODE
string sLinehld
if fopen 0 "C:\Work\Date.txt" READ
while not feof 0
fgets 0 sLinehld
substr sACCOUNT sLinehld 0 5
substr sCCODE sLinehld 6 9
transmit "8.1.01^M"
waitfor "^[[4m"
transmit sACCOUNT
transmit "^M"
waitfor "^[[4m"
;here is the problem encountered
;if waitfor "^[[0mKey RETURN to continue. ^[[0m" ;need to transmit "^M' once and then transmit "1^M"
;else
;transmit "1^M"
;endif
waitfor "^[[4m"
transmit "9000^M"
endwhile
endif
endproc