"b = a.readdall"??
as per your code in the first post of this thread, you should use
c=b.readall
can you paste your complete code , may be that can help us to identify the issue.
I tried with your earlier code, it working fine at my side with required modification.
when you say not working at all means -are you getting any error message or your comparison fails? with your modified code you will get the error message "Expected statement", anyway- you can check with the code below
also I found that the data you have mentione in the query and you are using to verify that is not proper. There should be 'San Francisco' instead of 'Francisco'. check this out may be this is the reason your comparison gets fail.
also if you remove IF statement remove the End IF statement as well.
as per your code in the first post of this thread, you should use
c=b.readall
can you paste your complete code , may be that can help us to identify the issue.
I tried with your earlier code, it working fine at my side with required modification.
when you say not working at all means -are you getting any error message or your comparison fails? with your modified code you will get the error message "Expected statement", anyway- you can check with the code below
Code:
Set a=CreateObject("scripting.filesystemobject")
Set b=a.opentextfile("C:\Documents and Settings\madhu\Desktop\te.txt",1)
If b.atendofstream <> true Then
c=b.readall
End If
d=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
temp=0
For i=0 to d-1
g=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
h=h+g+vbcrlf
Next
MsgBox h
If h = c then temp=1
If temp=1 Then
MsgBox "pass"
else
MsgBox "Fail"
End If
Window("Flight Reservation").Close
also if you remove IF statement remove the End IF statement as well.