Results 1 to 5 of 5

Thread: Need help with a loop!

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    3

    Unhappy

    Hi,

    I need help existing this loop. The below code works as I want but I can't get it to exit. What I need to happen is when " Redisplay ? (Y/<N>) :" is received from the host it needs to exit. I can't figure out how to turn the host string into a variable so I can set the loop to exit when it becomes false, or true. Any help would be greatly appreciated! TIA!

    Do
    .StatusBar = "Waiting for Prompt: CONTINUE ? (<Y>/N)"
    .WaitForString LF & "CONTINUE ? (<Y>/N) ", NEVER_TIME_OUT_
    , rcAllowKeystrokes
    .StatusBar = ""
    .Transmit CR
    Loop

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    To exit a loop you could either:

    Code:
    Do While Condition = True
    
    OR
    
    Loop While Condition = True
    Or

    Code:
    Do
    If condition = True Then Exit Do
    Loop
    Hope that helped!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    3
    The problem I'm having is setting up the condition. I can't figure out how to define the data received from the host as a condition that can be evaluated. Thanks.

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    hmm.. what control are you using?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    3
    Hehe, double hmmmm... the host i'm interacting with sends a line feed infront of everything. if that's not what your referring too i'm lost. i'm using a vt420 emulation app that uses vb for scripting purposes. i'm new to vb but i understand the do..loop, if..then, etc syntax. thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width