VBScript to read specific line and extract characters and store it as a variable

前端 未结 2 787
花落未央
花落未央 2020-12-06 15:14

I have a VB script that reads the 11th line from a text file. However from that line I need to extract characters 48 through 53 and save it as a variable. After this is acco

2条回答
  •  感情败类
    2020-12-06 15:24

    Take a look at InStr function. It lets you search for a substring.

    http://www.w3schools.com/vbscript/func_instr.asp

    Then you can use the Right function to parse out the end bit of the line.

    You can also look at the Split function so you can parse the lines into arrays and deal with it that way which would be best.

    http://www.w3schools.com/vbscript/func_split.asp

提交回复
热议问题