-
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?
-
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 ;)
-
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.
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)