Skip to main content

Hey guys,

I have a script im writing for Rumba so that I can compare a screen read to each line of a text file so that I don't have duplication. It doesn't seem to work and Im having a hard time figuring out why. My code can be seen below.

 Dim eachLine As String
 Open FName for Input As #2
  While Not EOF(2)
   Line Input #2, eachLine
   If enterTicketNum = eachLine Then
    Goto HandleRepeat
   End If
  Wend
 Close #2


#Rumba

Hey guys,

I have a script im writing for Rumba so that I can compare a screen read to each line of a text file so that I don't have duplication. It doesn't seem to work and Im having a hard time figuring out why. My code can be seen below.

 Dim eachLine As String
 Open FName for Input As #2
  While Not EOF(2)
   Line Input #2, eachLine
   If enterTicketNum = eachLine Then
    Goto HandleRepeat
   End If
  Wend
 Close #2


#Rumba
Hi skelk92,

it looks like the Line Input statement is not stripping out the <CR> (&H13) from the end of each line

Can you retest with the following code?

Dim eachLine As String
Open FName For Input As #1
While Not EOF(1)
Line Input #1, eachLine
If enterTicketNum = Left(eachLine, Len(eachLine) - 1) Then
GoTo HandleRepeat
End If
Wend
Close #1

'Tom