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 |
I wrote the vbscript code on notepad i was geeting run time error "object required line 1" my code is set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signin("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Setsec ure.Crypt.Encrypt("entr password") browser("gmail").page("gmail").WebButton("siginobj").click pls tell me whats wrong
How are comments handled in the vbscript language?
what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com
find the length of the string without using length function?
What variable can you use to share info across the whole application for one user?
How will you convert a given number to long in vbscript?
If else for do while select in vb script?
what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans
write a program to display the system specifications of client system with the help of vbScript.
Explain the operator precedence in vb script?
What's the difference between vbscript and vb.net?