Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:19:55+00:00 2026-06-08T23:19:55+00:00

Is it possible inside a loop to either move to next line or temporarily

  • 0

Is it possible inside a loop to either move to next line or temporarily read next line? I have not had much luck finding any useful data on how one would do this, my guess is somehow find the line number (index) of what line you are currently on and then read +1 from where you are.

Using TestFile As New IO.StreamReader(My.Settings.cfgPath & "tempRPT.txt", System.Text.Encoding.Default, False, 4096)
        Do Until TestFile.EndOfStream
            ScriptLine = TestFile.ReadLine
            ScriptLine = LCase(ScriptLine)
            If InStr(ScriptLine, "update: [b") Then
                Dim m As Match = Regex.Match(ScriptLine, "\(([^)]*)\)")
                builder.AppendLine(m.Value)

                'This is where it would move to next line temporarily to read from it
                If InStr(ScriptLine, "hive: write:") > 0 Or InStr(ScriptLine, "update: [b") > 0 Then 'And InStr(ScriptLine, "setmarkerposlocal.sqf") < 1 Then
                   builder.AppendLine(ScriptLine)

                End If
            End If

        Loop
    End Using
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:19:58+00:00Added an answer on June 8, 2026 at 11:19 pm

    Try this. Real all the lines and put them in a Queue(Of T) object.

        Dim path As String = My.Settings.cfgPath & "tempRPT.txt"
    
        Dim lines As String() = IO.File.ReadAllLines(path, System.Text.Encoding.Default)
        Dim que = New Queue(Of String)(lines)
    
        Do While que.Count > 0
            ScriptLine = que.Dequeue()
            ScriptLine = LCase(ScriptLine)
            If InStr(ScriptLine, "update: [b") Then
                Dim m As Match = Regex.Match(ScriptLine, "\(([^)]*)\)")
                builder.AppendLine(m.Value)
    
                Dim next_line As String = que.Peek      'Read next line temporarily                'This is where it would move to next line temporarily to read from it
                If InStr(next_line, "hive: write:") > 0 Or InStr(next_line, "update: [b") > 0 Then 'And InStr(next_line, "setmarkerposlocal.sqf") < 1 Then
                    builder.AppendLine(next_line)
                End If
            End If
        Loop
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to do a for loop inside of Less. Is it possible
Is it possible to wait for user touch inside a while loop? I mean,
is it possible to add i to a var inside a for-loop? in wrong
I have a nested while loop inside a foreach loop where I would like
I'm using thread to download something from internet. I don't have any loop inside
Is it possible to set properties of an control inside a loop without using
Possible Duplicate: Why is iostream::eof inside a loop condition considered wrong? So I've been
Is it possible to declare global variables in MATLAB inside a loop: cellvar =
I was wondering, is it possible to run a for loop inside of a
How can I use Progress Dialog box with for Loop. Means either inside the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.