Hello all! If anyone out here can help me, I would be incredibly appreciative. I am trying to use ProComm to read a list of numbers from a text file, and use them is a script for a Meridian system. The text file would have the numbers separated by carriage returns. For example:
1234567
1111111
3434343
The program is supposed to loop, and continue to enter the numbers until the end of the file is reached. The following program was posted here a few months ago, it is almost exactly what I need. However, when I tried to run it, it only output a carriage return, leading me to believe that it did not read the file correctly (the file is in the right location and named properly).
Can anyone point me in a direction to get this working?? Thanks in advance!
-Mike
proc main
string Fname = "c:\friends.txt"
string authcode[100]
string Line
integer Counter=0
fopen 0 Fname READ TEXT
while not feof 0
fgets 0 Line
Authcode[Counter]=Line
Counter++
transmit "^M"
waitfor "REQ "
transmit "NEW^M"
waitfor "TYPE "
transmit "AUT^M"
waitfor "CUST "
transmit "0^M"
waitfor "SPWD "
transmit "0000^M"
waitfor "CODE "
transmit Line RAW
waitfor "SARC "
transmit "^M"
waitfor "CLASS "
transmit "1^M"
endwhile
endproc
1234567
1111111
3434343
The program is supposed to loop, and continue to enter the numbers until the end of the file is reached. The following program was posted here a few months ago, it is almost exactly what I need. However, when I tried to run it, it only output a carriage return, leading me to believe that it did not read the file correctly (the file is in the right location and named properly).
Can anyone point me in a direction to get this working?? Thanks in advance!
-Mike
proc main
string Fname = "c:\friends.txt"
string authcode[100]
string Line
integer Counter=0
fopen 0 Fname READ TEXT
while not feof 0
fgets 0 Line
Authcode[Counter]=Line
Counter++
transmit "^M"
waitfor "REQ "
transmit "NEW^M"
waitfor "TYPE "
transmit "AUT^M"
waitfor "CUST "
transmit "0^M"
waitfor "SPWD "
transmit "0000^M"
waitfor "CODE "
transmit Line RAW
waitfor "SARC "
transmit "^M"
waitfor "CLASS "
transmit "1^M"
endwhile
endproc