Write a VB Script to count blank Lines in a notepad
Answers were Sorted based on User's Feedback
Answer / usha
set fso=createobject("scripting.filesystemobject")
set f=fso.opentextfile("C:usha.txt")
c=0
do until (f.atendofstream)
a=f.readline()
if len(a)=0 then
c=c+1
end if
loop
msgbox c
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pravati
Set fso=createobject("scripting.filesystemobject")
Set qfile=fso.OpenTextFile("c:Rinkuaby.txt",1,true)
Do While qfile.AtEndOfStream<>true
x=qfile.ReadLine
msgbox x
If len(x)=0 Then
y=y+1
End If
msgbox y
loop
Is This Answer Correct ? | 0 Yes | 0 No |
My questions is while writting descriptve programming, lets take flight reservation. Line1: systemutil.Run "D:\Program Files\Mercury Interactive\QuickTestProfessional\samples\flight\app\flight4 a.exe" dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "mercury" dialog("text:=Login").WinEdit("attached text:=Password:").Set "mercury" dialog("text:=Login").WinButton("text:=OK").click window("text:=Flight Reservation").Activate window("text:=Flight Reservation").ActiveX ("acx_name:=MaskEdBox").Type "111111" window("text:=Flight Reservation").WinComboBox("attached text:=Fly From:").Select "Frankfurt" window("text:=Flight Reservation").WinComboBox("attached text:=Fly To:").Select "London" window("text:=Flight Reservation").WinButton ("text:=FLIGHT").Click window("text:=Flight Reservation").dialog("text:=Flights Table").WinList("text:=From").Select "13536 FRA 08.00AM LON 08.45AM SR $163.00" window("text:=Flight Reservation").dialog("text:=Flights Table").WinButton("text:=OK").Click window("text:=Flight Reservation").WinEdit("attached text:=Name:").Exist window("text:=Flight Reservation").WinEdit("attached text:=Name:").Set "sagar", Now i m getting the error in the last line. it is not accepting the WinEdit("attached text:=Name:") Please do solve this urgent...! and i want to know how to insert additional properties for an object and which properties we need to select from the object spy.
What are the different types of loops available in the vbscript language?
How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)
My Salary is 65000. How Much TDS I have to pay
Hi I am having one folder with set of text files now i want to read and write that text files data into QTP. Any help plsss.
WHAT IS ENVIRONMENT VARIABLES?and where it is used in real time scenario?
Write a VB Script to count blank Lines in a notepad
What are the differences between sub procedures and function procedures?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
How to create a cookie using vbscript?
How to learn VB Script, Since iam working with QTP. So i need to learn VB script.
can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)