Results 1 to 3 of 3

Thread: txt look up

  1. #1

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Cool

    this is really for my lego mindstorms robot, but im programing it in vb. i want to put in a txt box, and when a user types in something like "RCX move forward." the computer will see "forward" and will then move my robot forward. how would i make the compter find that txt?

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    How can you ask us to move a robot?!?
    here's the way VB find things in strings.
    Code:
    Dim Command$
    Command = "RCX move forward" 
    If Instr(1, Command, "forward") Then Move(Robot, Forward)
    Or
    Code:
    Dim Command$
    Command = "RCX move forward" 
    If Command Like "*forward*" Then Move(Robot, Forward)
    have fun
    Jop - validweb.nl

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

  3. #3

    Thread Starter
    Banned
    Join Date
    Dec 2000
    Location
    USA, NJ
    Posts
    72

    Talking THX

    THX, THX, THX!!! I needed that. Now the user can type in commands and the robot will move. And this is the Lego Mindstorms Robotic System. It pretty cool. You can build and program your a robot. goto http://www.legomindstorms.com and cheak it out.

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