Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Sunday 31 March 2019

Finding the specified string in Notepad using VB Scripting

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("D:/SAPECC.txt", 1)
line_num = 0
Do Until objFile.AtEndOfStream
    strLine = objFile.ReadLine
    msgbox( strLine)
    line_num = line_num+1
         If  instr(1,strLine,"Online")<> 0 Then
               MyPos = instr(1,strLine,"Online")
               Msgbox "Line No: " &line_num& " Position: "&MyPos
        EndIf
Loop
objFile.Close
objFSO = nothing
objFile = nothing

No comments:

Post a Comment

Note: only a member of this blog may post a comment.