I am trying to install a script that calls 3 text files up. I have stored the files in the aspect folder of procomm, but the script fails when it gets to the point of calling the file.
Can anyone see where i am going wrong.
proc main
string tn
string mem
string des
if fopen 0 "tn.txt" read
if fopen 1 "mem.txt" read
if fopen 2 "des.txt" read
while not feof 0
fgets 0 tn
fgets 1 mem
fgets 2 des
transmit "new^M"
waitfor "TYPE "
transmit "did^M"
waitfor "TN "
transmit tn
waitfor "DES "
transmit des
waitfor "PDCA "
transmit "2^M"
waitfor "PCML "
transmit "a^M"
waitfor "cust"
transmit "o^m"
waitfor "NCOS "
transmit "7^M"
waitfor "RTMB "
transmit "0 "
transmit mem
waitfor "NITE "
transmit "^M"
waitfor "AST "
transmit "^M"
waitfor "CLS "
transmit "unr dtn^M"
waitfor "TKID "
transmit "^M"
waitfor "req"
pause 2
endwhile
else
endif
endif
endif
endproc
Can anyone see where i am going wrong.
proc main
string tn
string mem
string des
if fopen 0 "tn.txt" read
if fopen 1 "mem.txt" read
if fopen 2 "des.txt" read
while not feof 0
fgets 0 tn
fgets 1 mem
fgets 2 des
transmit "new^M"
waitfor "TYPE "
transmit "did^M"
waitfor "TN "
transmit tn
waitfor "DES "
transmit des
waitfor "PDCA "
transmit "2^M"
waitfor "PCML "
transmit "a^M"
waitfor "cust"
transmit "o^m"
waitfor "NCOS "
transmit "7^M"
waitfor "RTMB "
transmit "0 "
transmit mem
waitfor "NITE "
transmit "^M"
waitfor "AST "
transmit "^M"
waitfor "CLS "
transmit "unr dtn^M"
waitfor "TKID "
transmit "^M"
waitfor "req"
pause 2
endwhile
else
endif
endif
endif
endproc